Files
bitchmin/server/Dockerfile
Fergal Moran 256612f9cb Initial commit
2020-09-04 04:15:12 +01:00

30 lines
611 B
Docker

FROM python:3.7.4-alpine
RUN adduser -D bitchmin
RUN mkdir /bitchmin
WORKDIR /bitchmin
COPY ./requirements.txt requirements.txt
RUN apk update && \
apk add --no-cache --virtual build-deps gcc python3-dev musl-dev bind-tools && \
apk add postgresql-dev && \
pip install -r requirements.txt
RUN python3.7 -m venv venv
RUN venv/bin/pip install -r requirements.txt
RUN venv/bin/pip install gunicorn
COPY app app
COPY migrations migrations
COPY server.py boot.sh ./
RUN chmod +x boot.sh
ENV FLASK_APP server.py
RUN chown -R bitchmin:bitchmin ./
USER bitchmin
EXPOSE 5000
ENTRYPOINT ["./boot.sh"]