[TIP] Create a custom Docker image with timezone support

Offen
#1,302 0 Kommentare 2 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
1/5
Geschätzter Aufwand
Unter einer Stunde
Anfängerfreundlichkeit
25/100
Issue-Typ
Dokumentation
Klarheit
Klar beschrieben
Aktivitätsstatus
Ruhig
Tech-Stack
docker, dockerfile
Bereich
documentation

Rechercherichtung

The issue provides a Dockerfile example and build/run commands; no repository file or test is identified. Read the example and verify whether it belongs in the project's documentation. Done means the timezone-support instructions are available to users in the appropriate place.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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
Vorherrschende Sprache
Rust
Sterne
2.6k
Forks
175
Ø Merge
14 Std. 16 Min.
Gemergte PRs (30 T.)
43

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus sqlpage/SQLPage

Alle Issues in sqlpage/SQLPage

Ähnliche Issues

Weitere Issues zu Rust

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.