feat: add timezone support, explicit /tmp permissions, and pin tzdata to 2025c-r0#12
Merged
feat: add timezone support, explicit /tmp permissions, and pin tzdata to 2025c-r0#12
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds timezone support to the Runtime Node image by installing
tzdata=2025c-r0in the builder stage, copying/usr/share/zoneinfointo the final scratch image with--chmod=555, and settingENV TZ=UTCas the default timezone baked into the image. It also makes the/tmppermissions explicit by adding--chmod=1777to itsCOPYinstruction, which previously relied on the sticky-bit being preserved implicitly from the builder stage. Section numbering in the Dockerfile comments is updated to accommodate the newTimezone Supportsection. A follow-up fix pinstzdatato an exact Alpine package version (2025c-r0) and addsapk updatebefore the install to ensure a reproducible and deterministic build, which resolved a failure in the PR test suite.Files Changed
Added:
Modified:
DockerfileDeleted:
Key Changes
RUN apk update && apk add --no-cache tzdata=2025c-r0to the builder stage, pinning the IANA timezone database to the exact Alpine package version2025c-r0.COPY --from=builder --chmod=555 /usr/share/zoneinfo /usr/share/zoneinfoto the runtime stage, copying the full timezone database from the builder into the final scratch image.ENV TZ=UTCto the runtime stage, settingUTCas the default timezone baked into the image./tmpcopy fromCOPY --from=builder /target/tmp /tmptoCOPY --from=builder --chmod=1777 /target/tmp /tmp, making the sticky-bit1777permissions explicit rather than relying on implicit preservation from the builder stage.2. Security→3. Security,3. Dependencies→4. Dependencies,4. Core→5. Core, with the new2. Timezone Supportsection inserted between DNS configuration and CA certificates.