appleboy / drone-ssh

Drone plugin for executing remote ssh commands
MIT License
239 stars 73 forks source link

Request to Add Timezone Environment Variable Support in Docker Image #273

Closed hhdebb closed 1 month ago

hhdebb commented 2 months ago

Hello,

I am currently using your Docker image [appleboy/drone-ssh] and have encountered an issue regarding timezone settings. As it stands, the image is based on Alpine Linux which doesn't include the tzdata package by default. This omission prevents users from setting the timezone via environment variables, which is a commonly expected feature in Dockerized environments.

Issue Description When attempting to configure the timezone using the standard TZ environment variable, I found that the timezone does not actually change within the container. This is due to the absence of the tzdata package in the Alpine-based image. As a result, any software or processes running within the container that rely on local timezone settings do not behave as expected.

Suggested Enhancement I would like to request the inclusion of the tzdata package in the Docker image. This addition would allow users to set their desired timezone using the TZ environment variable effectively. Here’s a suggested modification to the Dockerfile:

FROM alpine:3.17
RUN apk add --no-cache tzdata

Benefits User Flexibility: Allows users to set the timezone explicitly, making the container behave more predictably for applications sensitive to time settings. Reduced Workarounds: Users won’t have to create derived images with tzdata installed or mount /etc/localtime as a volume, both of which are current workarounds. Alignment with User Expectations: Many users expect Docker images to respect the TZ environment variable, and this change would align your image with those expectations. Thank you for considering this enhancement. I believe it would make the image more versatile and user-friendly, especially for those of us using it in globally distributed applications.

Best regards