Created
January 15, 2019 16:22
-
-
Save dineshsonachalam/80ed0a857cc584e628f4ecf370a9017e 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. | |
| # start gunicorn | |
| CMD ["gunicorn","--config","/app/gunicorn_config.py","app:app"] | |
| EXPOSE 8005 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment