server/docker: use Alpine-based image for space savings

This commit is contained in:
Shyam Sunder
2019-09-29 18:39:16 -04:00
parent 6da18036a4
commit 4fe9c5f4ca
5 changed files with 45 additions and 20 deletions

View File

@ -10,7 +10,14 @@ ARG BASE_IMAGE
FROM ${BASE_IMAGE}
WORKDIR /opt/app
USER root
RUN pip3 install --no-cache-dir pytest-cov freezegun
RUN apk --no-cache add \
py3-pytest \
py3-pytest-cov \
&& \
pip3 install \
--no-cache-dir \
--disable-pip-version-check \
freezegun
USER app
ENV POSTGRES_HOST=x \
POSTGRES_USER=x \
@ -20,4 +27,6 @@ CMD ["pytest", "szurubooru/", \
"--cov-report=term-missing", "--cov=szurubooru", "--tb=short"]
EOF
docker run --rm -t ${IMAGE_NAME}-test
docker run --rm -t ${IMAGE_NAME}-test
exit $?