Skip to content

Instantly share code, notes, and snippets.

@magicalyak
Created May 14, 2019 16:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save magicalyak/dc03f44a1561068bce7d3809643b7bf3 to your computer and use it in GitHub Desktop.
Save magicalyak/dc03f44a1561068bce7d3809643b7bf3 to your computer and use it in GitHub Desktop.
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