Tzdata package in the docker images

It would be helpful to add the tzdata package to the docker images of the server and the runner so that can easily control the timezone of the containers by passing the TZ variable to the pods environment

Can you please elaborate? The Drone server and Drone docker runner rely solely on unix timestamps which is UTC by definition, so it is not immediately clear to me why the tzdata package would be needed in these docker images, although I am also probably lacking the full context to understand this better.

If you want tzdata in your pipeline containers, it is important to note that pipeline containers are not created inside the server or runner images. Drone uses the host machine docker socket (which is mounted into the runner) to communicate with the host machine docker instance, and launch containers on the host.

We are also moving to scratch images for security reasons, so the goal is to bundle less inside our images, as opposed to more. So we would probably need strong justification to reverse course on this decision, and weight the pros and cons as it relates to our security goals. Either way, there should always be a workaround available where you use the base Drone image in your own dockerfile, and you add additional pacakges as needed.

FROM drone/drone
RUN apk install tzdata

Thanks for your feedback and the proposed workaround.

I work in the log management context and I rarely come across containers that I cannot control the correct timezone by simply passing the TZ variable for the kubernetes pods. Having all the logs unified in the same timezone is useful also in the operations and security contexts where you want to correlate log events from different sources or not always look into the last few lines of the logs.

Thanks for the additional details.

Instead of installing the tzdata package in the Docker image, which might conflict with our goals of moving to scratch images, there is a pure Go solution to embed tzdata in the Go binary. See

This is something we would need to research further, but sounds promising.