-
-
Notifications
You must be signed in to change notification settings - Fork 172
[TIP] Create a custom Docker image with timezone support #1302
Open
Description
Just in case anyone stumble on the same issue, here's how to easily create a lightweight Docker image based on the official one but with added support for timezones:
FROM lovasoa/sqlpage # Add proper support for timezone ENV TZ=UTC COPY --from=debian:12-slim /usr/share/zoneinfo /usr/share/zoneinfo # Example if your source code is in ./src/ COPY ./src/ /var/www
That's it.
Now you can build and then run your app, using TZ to specify the timezone:
docker build -t my-sqlpage-image . docker run --rm -e TZ=Europe/Paris --entrypoint=/bin/sh my-sqlpage-image date # => should display the right time for Europe/Paris and not UTC
Metadata
Metadata
Assignees
Labels
No labels
Type
Fields
Give feedbackNo fields configured for issues without a type.