Created
March 2, 2018 18:27
-
-
Save SehgalDivij/309bf381b5d0332f2fc263739c791805 to your computer and use it in GitHub Desktop.
An ideal way of installing dependencies while building a container Using a Dockerfile. Store dependencies in a file, copy it and then RUN install on that from within the related Dockerfile.
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
FROM python:2.7 | |
ENV PYTHONUNBUFFERED 1 | |
RUN mkdir /config | |
ADD /requirements.txt /config/ | |
RUN pip install -r config/requirements.txt; | |
RUN mkdir /src; | |
# Create Log Directories | |
RUN mkdir /logs; | |
RUN mkdir /logs/rest_api; | |
# Create Log File Placeholders: dev and prod. | |
RUN touch /logs/rest_api/dev; | |
RUN touch /logs/rest_api/prod; | |
WORKDIR /src |
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
schema==0.6.6 | |
psycopg2==2.7.4 | |
tornado==4.4.2 | |
pyzmq==16.0.2 | |
functools32==3.2.3.post2 | |
momoko==2.2.4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment