File tree Expand file tree Collapse file tree 1 file changed +13
-9
lines changed Expand file tree Collapse file tree 1 file changed +13
-9
lines changed Original file line number Diff line number Diff line change 11FROM docker.io/library/alpine:3.22 AS production
22
33# Container build arguments
4- ARG LOGROTATE_VERSION=latest
5- ARG CONTAINER_UID=1000
6- ARG CONTAINER_GID=1000
4+ ARG image_version=edge
5+ ARG build_commit_sha=unknown
6+ ARG logrotate_version=latest
7+ ARG container_uid=1000
8+ ARG container_gid=1000
79
8- ENV CONTAINER_UID=${CONTAINER_UID} \
9- CONTAINER_GID=${CONTAINER_GID}
10+ ENV container_uid=${container_uid} \
11+ container_gid=${container_gid} \
12+ LOGROTATE_CONTAINER_VERSION=${image_version} \
13+ LOGROTATE_CONTAINER_BUILD_COMMIT=${build_commit_sha}
1014
1115# Install logrotate and go-cron - also create logrotate user and group
12- RUN addgroup -g $CONTAINER_GID logrotate && \
13- adduser -u $CONTAINER_UID -G logrotate -h /usr/bin/logrotate.d -s /bin/bash -S logrotate && \
16+ RUN addgroup -g $container_gid logrotate && \
17+ adduser -u $container_uid -G logrotate -h /usr/bin/logrotate.d -s /bin/bash -S logrotate && \
1418 apk add --update bash tar gzip tzdata tini && \
15- if [ "${LOGROTATE_VERSION }" = "latest" ]; \
19+ if [ "${logrotate_version }" = "latest" ]; \
1620 then apk add logrotate ; \
17- else apk add "logrotate=${LOGROTATE_VERSION }" ; \
21+ else apk add "logrotate=${logrotate_version }" ; \
1822 fi && \
1923 mkdir -p /usr/bin/logrotate.d && \
2024 rm -rf /var/cache/apk/* && rm -rf /tmp/*
You can’t perform that action at this time.
0 commit comments