1
0
mirror of https://github.com/etesync/server synced 2024-11-26 10:48:21 +00:00
etesync-server/docker/test-server/Dockerfile
2021-04-17 19:03:35 +03:00

39 lines
1.1 KiB
Docker

FROM python:3.9.0-alpine
ARG ETESYNC_VERSION
ENV PIP_DISABLE_PIP_VERSION_CHECK=1
ENV PIP_NO_CACHE_DIR=1
# install packages and pip requirements first, in a single step,
COPY /requirements.txt /requirements.txt
RUN set -ex ;\
apk add libpq postgresql-dev --virtual .build-deps coreutils gcc libc-dev libffi-dev make ;\
pip install -U pip ;\
pip install --no-cache-dir --progress-bar off -r /requirements.txt ;\
apk del .build-deps make gcc coreutils ;\
rm -rf /root/.cache
COPY . /app
RUN set -ex ;\
mkdir -p /data/static /data/media ;\
cd /app ;\
mkdir -p /etc/etebase-server ;\
cp docker/test-server/etebase-server.ini /etc/etebase-server ;\
sed -e '/ETEBASE_CREATE_USER_FUNC/ s/^#*/#/' -i /app/etebase_server/settings.py ;\
chmod +x docker/test-server/entrypoint.sh
# this is a test image and should start up quickly, so it starts with the DB
# and static data already fully set up.
RUN set -ex ;\
cd /app ;\
python manage.py migrate ;\
python manage.py collectstatic --noinput
ENV ETESYNC_VERSION=${ETESYNC_VERSION}
VOLUME /data
EXPOSE 3735
ENTRYPOINT ["/app/docker/test-server/entrypoint.sh"]