mirror of
https://github.com/fergalmoran/bitchmin.git
synced 2026-02-15 20:34:50 +00:00
30 lines
611 B
Docker
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"] |