From 145ea7f2bd37e84f53660b4eb3b14ffd4d16806c Mon Sep 17 00:00:00 2001 From: arnoldyahad Date: Tue, 11 Jul 2023 12:31:28 +0300 Subject: Docker directory for specific clouds --- docker/README.md | 12 ++++++++++++ docker/aws.Dockerfile | 28 ++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 docker/README.md create mode 100644 docker/aws.Dockerfile diff --git a/docker/README.md b/docker/README.md new file mode 100644 index 0000000..a1bf1da --- /dev/null +++ b/docker/README.md @@ -0,0 +1,12 @@ +# Dockerfiles for specific clouds + +This directory will include Dockerfiles for various cloud providers. + +## AWS + +For the usage of `krr` container we need the Dockerfile to have `awscli` installed on it. +The `aws.Dockerfile` is a modified `krr` dockerfile which includes: + - installation of curl & zip + - installation of awscli + + diff --git a/docker/aws.Dockerfile b/docker/aws.Dockerfile new file mode 100644 index 0000000..13d79b8 --- /dev/null +++ b/docker/aws.Dockerfile @@ -0,0 +1,28 @@ +# Use the official Python 3.9 slim image as the base image +FROM python:3.9-slim as builder + +# Set the working directory +WORKDIR /app + +# Install system dependencies required for Poetry +RUN apt-get update && \ + dpkg --add-architecture arm64 + +COPY ./requirements.txt requirements.txt + +# Install the project dependencies +RUN pip install -r requirements.txt + +# Install curl and unzip for awscli +RUN apt-get -y update; apt-get -y install curl; apt-get -y install unzip + +# Download awscli and unzip it +RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && \ + unzip awscliv2.zip && \ + ./aws/install + +# Copy the rest of the application code +COPY . . + +# Run the application using 'poetry run krr simple' +ENTRYPOINT ["python", "krr.py", "simple"] -- cgit v1.2.3