[TIP] Create a custom Docker image with timezone support

Aperta
#1,302 0 commenti 2 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
1/5
Tempo stimato
Meno di un'ora
Idoneità per principianti
25/100
Tipo di issue
Documentazione
Chiarezza
Specificata chiaramente
Stato di attività
Tranquilla
Stack tecnologico
docker, dockerfile
Ambito
documentation

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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
Lingua principale
Rust
Stelle
2.6k
Fork
175
Merge medio
14h 16m
PR unite (30g)
43

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di sqlpage/SQLPage

Tutte le issue di sqlpage/SQLPage

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.