[TIP] Create a custom Docker image with timezone support

Đang mở
#1,302 0 bình luận 2 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
1/5
Thời gian dự kiến
Dưới một giờ
Mức phù hợp với người mới
25/100
Loại issue
Tài liệu
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
docker, dockerfile
Lĩnh vực
documentation

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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
Ngôn ngữ chính
Rust
Star
2.6k
Fork
175
Merge trung bình
14 giờ 16 phút
Pull request đã merge (30 ngày)
43

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của sqlpage/SQLPage

Tất cả issue của sqlpage/SQLPage

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.