Skip to content

Instantly share code, notes, and snippets.

@aalokt89
Last active March 6, 2023 09:18
Show Gist options
  • Save aalokt89/2554f6c02534c5e2713f6d95246e690e to your computer and use it in GitHub Desktop.
Save aalokt89/2554f6c02534c5e2713f6d95246e690e to your computer and use it in GitHub Desktop.
Dockerfile example
FROM python:3.9-alpine3.17
#update, install curl, git, zip/unzip
RUN apk update \
&& apk add bash \
&& apk add curl zip git unzip iputils
#install aws cli
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" \
&& unzip awscliv2.zip \
&& ./aws/install -i /usr/local/aws-cli -b /usr/local/bin \
&& rm awscliv2.zip
#create/change woorking directory
WORKDIR /home/app
#copy requirements file
COPY requirements.txt .
#install dependencies
RUN pip install -r requirements.txt
#copy all files
COPY ./development .
CMD ["tail", "-f", "/dev/null"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment