docker: add tzdata package, to support TZ env variable

This commit is contained in:
Igor Rzegocki 2022-11-01 12:57:49 +01:00 committed by GitHub
parent e81c87f288
commit e3b1810229
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 4 deletions

View File

@ -86,7 +86,7 @@ RUN set -eux; \
# verify that the binary works # verify that the binary works
gosu --version; \ gosu --version; \
gosu nobody true gosu nobody true
RUN apk add --no-cache tini ca-certificates bash && \ RUN apk add --no-cache tini ca-certificates bash tzdata && \
addgroup -g $GID $USER && \ addgroup -g $GID $USER && \
adduser \ adduser \
--disabled-password \ --disabled-password \

View File

@ -58,7 +58,7 @@ ENV UID=1000
ENV GID=1000 ENV GID=1000
ENV USER=lldap ENV USER=lldap
RUN apt update && \ RUN apt update && \
apt install -y --no-install-recommends tini openssl ca-certificates gosu && \ apt install -y --no-install-recommends tini openssl ca-certificates gosu tzdata && \
apt clean && \ apt clean && \
rm -rf /var/lib/apt/lists/* && \ rm -rf /var/lib/apt/lists/* && \
groupadd -g $GID $USER && useradd --system -m -g $USER --uid $UID $USER && \ groupadd -g $GID $USER && useradd --system -m -g $USER --uid $UID $USER && \

View File

@ -82,7 +82,7 @@ COPY --from=builder /app/target/release/lldap /app/target/release/migration-tool
COPY docker-entrypoint.sh lldap_config.docker_template.toml ./ COPY docker-entrypoint.sh lldap_config.docker_template.toml ./
RUN set -x \ RUN set -x \
&& apk add --no-cache bash \ && apk add --no-cache bash tzdata \
&& for file in $(cat app/static/libraries.txt); do wget -P app/static "$file"; done \ && for file in $(cat app/static/libraries.txt); do wget -P app/static "$file"; done \
&& for file in $(cat app/static/fonts/fonts.txt); do wget -P app/static/fonts "$file"; done \ && for file in $(cat app/static/fonts/fonts.txt); do wget -P app/static/fonts "$file"; done \
&& chmod a+r -R . && chmod a+r -R .

View File

@ -100,7 +100,8 @@ contents are loaded into the respective configuration parameters. Note that
Example for docker compose: Example for docker compose:
* You can use either the `:latest` tag image or `:stable` as used in this example. * You can use either the `:latest` tag image or `:stable` as used in this example.
* `:latest` tag image contains recently pushed code or feature tests, in which some instability can be expected. * `:latest` tag image contains recently pushed code or feature tests, in which some instability can be expected.
* If `UID` and `GID` no defined LLDAP will use default `UID` and `GID` number `1000` * If `UID` and `GID` no defined LLDAP will use default `UID` and `GID` number `1000`.
* If no `TZ` is set, default `UTC` timezone will be used.
```yaml ```yaml
@ -125,6 +126,7 @@ services:
environment: environment:
- UID=#### - UID=####
- GID=#### - GID=####
- TZ=####/####
- LLDAP_JWT_SECRET=REPLACE_WITH_RANDOM - LLDAP_JWT_SECRET=REPLACE_WITH_RANDOM
- LLDAP_LDAP_USER_PASS=REPLACE_WITH_PASSWORD - LLDAP_LDAP_USER_PASS=REPLACE_WITH_PASSWORD
- LLDAP_LDAP_BASE_DN=dc=example,dc=com - LLDAP_LDAP_BASE_DN=dc=example,dc=com