2019-09-30 00:39:16 +02:00
|
|
|
FROM alpine:latest
|
2018-07-12 05:30:13 +02:00
|
|
|
WORKDIR /opt/app
|
|
|
|
|
|
|
|
RUN \
|
2019-09-30 00:39:16 +02:00
|
|
|
apk --no-cache add \
|
|
|
|
python3 \
|
|
|
|
dumb-init \
|
|
|
|
ffmpeg \
|
|
|
|
py3-waitress \
|
|
|
|
# from requirements.txt:
|
|
|
|
py3-yaml \
|
|
|
|
py3-psycopg2 \
|
|
|
|
py3-sqlalchemy \
|
|
|
|
py3-certifi \
|
|
|
|
py3-numpy \
|
|
|
|
py3-pillow \
|
|
|
|
py3-pynacl \
|
|
|
|
py3-tz \
|
|
|
|
py3-rfc3339 \
|
|
|
|
&& \
|
|
|
|
pip3 install --no-cache-dir --disable-pip-version-check \
|
|
|
|
alembic \
|
|
|
|
"coloredlogs==5.0" \
|
|
|
|
"elasticsearch>=5.0.0,<7.0.0" \
|
|
|
|
"elasticsearch-dsl>=5.0.0,<7.0.0" \
|
|
|
|
&& exit 0
|
2018-07-12 05:30:13 +02:00
|
|
|
|
2019-09-28 05:15:34 +02:00
|
|
|
ARG PUID=1000
|
|
|
|
ARG PGID=1000
|
|
|
|
RUN \
|
|
|
|
# Set users
|
|
|
|
mkdir -p /opt/app /data && \
|
2019-09-30 00:39:16 +02:00
|
|
|
addgroup -g ${PGID} app && \
|
|
|
|
adduser -SDH -h /opt/app -g '' -G app -u ${PUID} app && \
|
2019-09-28 05:15:34 +02:00
|
|
|
chown -R app:app /opt/app /data
|
|
|
|
USER app
|
2018-07-12 05:30:13 +02:00
|
|
|
|
2019-09-30 00:39:16 +02:00
|
|
|
COPY --chown=app:app ./ /opt/app/
|
|
|
|
|
|
|
|
ARG PORT=6666
|
|
|
|
ENV PORT=${PORT}
|
2018-07-12 05:30:13 +02:00
|
|
|
EXPOSE ${PORT}
|
2019-09-28 05:15:34 +02:00
|
|
|
VOLUME ["/data/"]
|
|
|
|
CMD ["/opt/app/docker-start.sh"]
|