Skip to content

Instantly share code, notes, and snippets.

@ashish-mj
Last active October 7, 2022 18:19
Show Gist options
  • Save ashish-mj/6f1cafaf0a05319f4bb16b464d787504 to your computer and use it in GitHub Desktop.
Save ashish-mj/6f1cafaf0a05319f4bb16b464d787504 to your computer and use it in GitHub Desktop.
# This is a sample Dockerfile
# set base image python:3.8-slim-buster
FROM python:3.8-slim-buster
# set working directory as app
WORKDIR /app
# copy requirements.txt file from local (source) to file structure of container (destination)
COPY requirements.txt requirements.txt
# Install the requirements specified in file using RUN
RUN pip3 install -r requirements.txt
# copy all items in current local directory (source) to current container directory (destination)
COPY . .
# command to run when image is executed inside a container
CMD [ "python3", "app.py" ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment