magicalyak
5/14/2019 - 4:19 PM

Dockerfile

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"]