Last active
October 30, 2018 06:02
-
-
Save dineshsonachalam/b4261928382d3a288236adc5344ff071 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Here we are creating an image for python alphine image.(https://hub.docker.com/r/library/python/) | |
FROM python:3 | |
# Copying the requirements.txt first to leverage Docker cache | |
COPY ./requirements.txt /app/requirements.txt | |
# WORKDIR is nothing but current directory (cd app) | |
WORKDIR /app | |
# Install the requirements in the current directory. | |
RUN pip install -r requirements.txt | |
# Copying the entire application to the docker container in the app directory. | |
COPY . /app | |
# Setting environmental path to app directory. path environment variables tells shell, | |
# which directories to search for executable files. | |
ENV PATH /app:$PATH | |
# It executes the command python app.py in the app directory. | |
CMD [ "python","app.py" ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment