Created
May 14, 2019 16:19
-
-
Save magicalyak/dc03f44a1561068bce7d3809643b7bf3 to your computer and use it in GitHub Desktop.
This file contains 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.12 | |
RUN groupadd flaskgroup && useradd -m -g flaskgroup -s /bin/bash flask | |
RUN mkdir -p /home/flask/app/web | |
RUN printf "deb http://archive.debian.org/debian/ jessie main\ndeb-src http://archive.debian.org/debian/ jessie main\ndeb http://security.debian.org jessie/updates main\ndeb-src http://security.debian.org jessie/updates main" > /etc/apt/sources.list | |
RUN apt-get update && apt-get install curl -y | |
WORKDIR /home/flask/app/web | |
COPY requirements.txt /home/flask/app/web | |
RUN pip install --no-cache-dir -r requirements.txt | |
COPY . /home/flask/app/web | |
RUN chown -R flask:flaskgroup /home/flask | |
USER flask | |
EXPOSE 5000 | |
ENTRYPOINT ["python"] | |
CMD ["dbz.py"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment