2019-09-05 12:42:21 +00:00
|
|
|
FROM python:3.6-alpine
|
2019-09-04 12:51:46 +00:00
|
|
|
|
|
|
|
|
2019-09-06 09:38:35 +00:00
|
|
|
EXPOSE 5000
|
|
|
|
|
|
|
|
|
|
|
|
ENV FLASK_APP=opaque.py
|
|
|
|
|
|
|
|
|
2019-09-05 14:39:50 +00:00
|
|
|
RUN apk add \
|
2019-10-23 12:42:23 +00:00
|
|
|
bash \
|
2019-09-05 14:39:50 +00:00
|
|
|
build-base \
|
2019-10-23 12:05:23 +00:00
|
|
|
git \
|
2019-09-05 14:39:50 +00:00
|
|
|
postgresql-dev
|
2019-09-04 12:51:46 +00:00
|
|
|
|
|
|
|
|
2019-09-05 12:42:21 +00:00
|
|
|
RUN adduser -D opaque
|
|
|
|
USER opaque
|
|
|
|
WORKDIR /home/opaque
|
|
|
|
|
|
|
|
|
|
|
|
COPY app app
|
2019-09-11 13:52:38 +00:00
|
|
|
COPY migrations migrations
|
2019-09-06 09:38:35 +00:00
|
|
|
COPY config.py opaque.py requirements.txt ./
|
2019-09-05 12:42:21 +00:00
|
|
|
RUN python -m venv venv && \
|
|
|
|
venv/bin/pip install -r requirements.txt
|
|
|
|
|
2019-10-23 11:58:27 +00:00
|
|
|
# add wait for it
|
2019-10-23 12:15:45 +00:00
|
|
|
RUN git clone https://github.com/vishnubob/wait-for-it.git
|
2019-09-05 12:42:21 +00:00
|
|
|
|
|
|
|
COPY docker-entrypoint.sh /usr/local/bin/
|
|
|
|
ENTRYPOINT ["docker-entrypoint.sh"]
|