feat: extracting environment variables

This commit is contained in:
ttionya
2022-07-02 22:00:50 +08:00
parent fe11695dbf
commit 9407bf6708
2 changed files with 10 additions and 5 deletions
+9 -4
View File
@@ -4,13 +4,18 @@ LABEL "repository"="https://github.com/ttionya/vaultwarden-backup" \
"homepage"="https://github.com/ttionya/vaultwarden-backup" \
"maintainer"="ttionya <git@ttionya.com>"
ARG USER_NAME="backuptool"
ARG USER_ID="1100"
ENV LOCALTIME_FILE="/tmp/localtime"
COPY scripts/*.sh /app/
RUN chmod +x /app/*.sh \
&& apk add --no-cache bash heirloom-mailx p7zip sqlite supercronic tzdata \
&& ln -sf /tmp/localtime /etc/localtime \
&& mkdir -m 777 /bitwarden \
&& addgroup -g 1100 backuptool \
&& adduser -u 1100 -Ds /bin/sh -G backuptool backuptool
&& apk add --no-cache bash heirloom-mailx p7zip sqlite supercronic tzdata \
&& ln -sf "${LOCALTIME_FILE}" /etc/localtime \
&& addgroup -g "${USER_ID}" "${USER_NAME}" \
&& adduser -u "${USER_ID}" -Ds /bin/sh -G "${USER_NAME}" "${USER_NAME}"
ENTRYPOINT ["/app/entrypoint.sh"]