lint dockerfile, set TZ and UID/GID, have client log.

This commit is contained in:
edgd1er 2021-10-15 01:47:18 +02:00
parent e620e9236a
commit f9e7df6af9
4 changed files with 175 additions and 49 deletions

View file

@ -1,6 +1,5 @@
# This is a minimized version from docker/docker-py3-kms/Dockerfile without SQLite support to further reduce image size
FROM alpine:3.12
FROM alpine:3.14
ENV IP 0.0.0.0
ENV PORT 1688
@ -11,7 +10,7 @@ ENV ACTIVATION_INTERVAL 120
ENV RENEWAL_INTERVAL 10080
ENV HWID RANDOM
ENV LOGLEVEL INFO
ENV LOGFILE /dev/stdout
ENV LOGFILE STDOUT
ENV LOGSIZE ""
COPY ./py-kms /home/py-kms
@ -27,11 +26,10 @@ RUN apk add --no-cache --update \
py3-pip \
tzdata \
build-base python3-dev && \
pip3 install peewee tzlocal pytz && \
apk del git build-base python3-dev
# Fix undefined timezone, in case the user did not mount the /etc/localtime
RUN cp /usr/share/zoneinfo/UTC /etc/localtime
pip3 install --no-cache peewee tzlocal pytz wheel && \
apk del git build-base python3-dev && \
# Fix undefined timezone, in case the user did not mount the /etc/localtime
ln -sf /usr/share/zoneinfo/UTC /etc/localtime
WORKDIR /home/py-kms
@ -40,3 +38,4 @@ EXPOSE ${PORT}/tcp
COPY docker/entrypoint.py /usr/bin/entrypoint.py
RUN chmod a+x /usr/bin/entrypoint.py
ENTRYPOINT ["/usr/bin/python3", "/usr/bin/entrypoint.py"]
#CMD["/usr/bin/start.py"]