Skip to content

Investigate timezone handling for shared dev images #7

@ScottMorris

Description

@ScottMorris

Summary

Investigate whether the shared dev image should keep setting the timezone in docker/ci/Dockerfile, or whether timezone preferences should move to downstream devcontainer.json configuration.

Context

The current dev image sets:

ENV TZ=America/Toronto
RUN ln -snf /usr/share/zoneinfo/${TZ} /etc/localtime \
    && echo "${TZ}" > /etc/timezone

That gives the image a system-level timezone default, but it also bakes a local preference into a shared image.

What we know

  • devcontainer.json can set TZ through remoteEnv or containerEnv.
  • That is a good fit when the goal is editor, terminal, and app-level timezone behaviour inside a devcontainer.
  • Setting TZ in devcontainer.json does not rewrite /etc/localtime or /etc/timezone.
  • If we want the container image itself to enforce a system timezone everywhere, the Dockerfile approach is still the stronger mechanism.
  • This repo does not currently ship a .devcontainer config, so moving timezone preferences out of the image would mean documenting the expectation for downstream consumers.

Questions to answer

  • Do we want the shared dev image to enforce a default system timezone?
  • Should timezone preference be treated as a downstream devcontainer concern instead?
  • Are there any tools in the shared image that actually require /etc/localtime to be set rather than just TZ?
  • If we remove the Dockerfile timezone setup, what documentation should be added for downstream repos?

Done when

  • We decide whether timezone belongs in the shared dev image or in downstream devcontainer config.
  • The decision is documented in the shared image docs.
  • If needed, the Dockerfile and/or downstream guidance are updated to match.

Metadata

Metadata

Assignees

No one assigned

    Labels

    developer-experienceDeveloper experience and onboarding improvementsdockerContainer build and publish workdocumentationImprovements or additions to documentationinfrastructureShared infrastructure and automation workneeds-decisionRequires maintainer decision before execution

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions