Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /