Skip to content

RE1-T117 Fixing docker container#405

Merged
ucswift merged 1 commit into
masterfrom
develop
Jun 10, 2026
Merged

RE1-T117 Fixing docker container#405
ucswift merged 1 commit into
masterfrom
develop

Conversation

@ucswift

@ucswift ucswift commented Jun 10, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • Bug Fixes
    • Fixed timezone handling issues across all containerized services. The timezone database is now properly included in runtime environments, preventing timezone resolution errors and ensuring accurate timezone conversions throughout the application.

@request-info

request-info Bot commented Jun 10, 2026

Copy link
Copy Markdown

Thanks for opening this, but we'd appreciate a little more information. Could you update it with more details?

@coderabbitai

coderabbitai Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Six service Dockerfiles are updated with consistent timezone database support. Each installs tzdata during the publish build stage and copies the IANA timezone database (/usr/share/zoneinfo) into the final distroless runtime image, setting TZ=Etc/UTC to enable .NET timezone resolution.

Changes

Timezone Database Support

Layer / File(s) Summary
Install tzdata and copy timezone data to final image across all services
Web/Resgrid.Web.Eventing/Dockerfile, Web/Resgrid.Web.Mcp/Dockerfile, Web/Resgrid.Web.Services/Dockerfile, Web/Resgrid.Web.Tts/Dockerfile, Web/Resgrid.Web/Dockerfile, Workers/Resgrid.Workers.Console/Dockerfile
Each Dockerfile installs tzdata in the publish stage via apt-get, then copies /usr/share/zoneinfo from publish into the final stage and sets ENV TZ=Etc/UTC. This pattern is applied consistently across all six services to provide timezone data in distroless base images that lack it by default.

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title is overly vague and does not clearly describe the specific changes made to the Dockerfiles across multiple services. Consider revising the title to be more specific, such as 'Add tzdata timezone database to Docker images' to better convey the main change.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch develop

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
Web/Resgrid.Web/Dockerfile (1)

23-23: ⚡ Quick win

Inconsistent stage selection and missing apt cache cleanup.

This Dockerfile installs tzdata in the build stage, while the other five Dockerfiles install it in the publish stage. Although this works functionally (since publish inherits from build), it creates inconsistency across the codebase.

Additionally, this RUN command doesn't clean up apt cache, leaving ~10-30MB of unnecessary data in the image layers.

♻️ Refactor to match the pattern used in other Dockerfiles

Move the tzdata installation to the publish stage and add cache cleanup:

Remove this line from the build stage (line 23):

-RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata

Add this block to the publish stage (after line 51, before the libman commands):

 FROM build AS publish
 ARG BUILD_VERSION
+RUN DEBIAN_FRONTEND=noninteractive apt-get update \
+    && apt-get install -y --no-install-recommends tzdata \
+    && rm -rf /var/lib/apt/lists/*
 RUN dotnet tool install -g Microsoft.Web.LibraryManager.Cli
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Web/Resgrid.Web/Dockerfile` at line 23, The tzdata installation RUN
(DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends
tzdata) should be removed from the build stage and instead added into the
publish stage (so it matches the other Dockerfiles); in the publish stage insert
the apt-get install for tzdata using DEBIAN_FRONTEND=noninteractive and ensure
apt cache cleanup by running apt-get clean and removing /var/lib/apt/lists/* in
the same RUN layer, and place this new RUN before the libman-related commands in
the publish stage so it follows the same pattern as the other Dockerfiles.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@Web/Resgrid.Web/Dockerfile`:
- Line 23: The tzdata installation RUN (DEBIAN_FRONTEND=noninteractive apt-get
install -y --no-install-recommends tzdata) should be removed from the build
stage and instead added into the publish stage (so it matches the other
Dockerfiles); in the publish stage insert the apt-get install for tzdata using
DEBIAN_FRONTEND=noninteractive and ensure apt cache cleanup by running apt-get
clean and removing /var/lib/apt/lists/* in the same RUN layer, and place this
new RUN before the libman-related commands in the publish stage so it follows
the same pattern as the other Dockerfiles.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 11c838f4-9481-4360-94ba-0bc69a924662

📥 Commits

Reviewing files that changed from the base of the PR and between c8c302b and b537f25.

📒 Files selected for processing (6)
  • Web/Resgrid.Web.Eventing/Dockerfile
  • Web/Resgrid.Web.Mcp/Dockerfile
  • Web/Resgrid.Web.Services/Dockerfile
  • Web/Resgrid.Web.Tts/Dockerfile
  • Web/Resgrid.Web/Dockerfile
  • Workers/Resgrid.Workers.Console/Dockerfile

@ucswift

ucswift commented Jun 10, 2026

Copy link
Copy Markdown
Member Author

Approve

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is approved.

@ucswift ucswift merged commit 0089d6a into master Jun 10, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant