Skip to content

feat: fix dockerfile missing package (tzdata)#160

Merged
hsluoyz merged 2 commits intoapache:masterfrom
pawelmarkowski:fix-dockerfile-missing-package
Feb 16, 2026
Merged

feat: fix dockerfile missing package (tzdata)#160
hsluoyz merged 2 commits intoapache:masterfrom
pawelmarkowski:fix-dockerfile-missing-package

Conversation

@pawelmarkowski
Copy link
Contributor

Alpine Linux (used in the Dockerfile) doesn't include timezone data by default, which causes the error:

 the request url is  /api/add-rule
2026/02/16 00:54:06.483 [C] [panic.go:884]  Handler crashed with error unknown time zone Asia/Singapore
2026/02/16 00:54:06.483 [C] [panic.go:884]  /usr/local/go/src/runtime/panic.go:884
2026/02/16 00:54:06.483 [C] [panic.go:884]  /go/src/caswaf/util/time.go:22
2026/02/16 00:54:06.483 [C] [panic.go:884]  /go/src/caswaf/controllers/rule.go:91
2026/02/16 00:54:06.483 [C] [panic.go:884]  /usr/local/go/src/reflect/value.go:586
2026/02/16 00:54:06.483 [C] [panic.go:884]  /usr/local/go/src/reflect/value.go:370
2026/02/16 00:54:06.483 [C] [panic.go:884]  /go/pkg/mod/github.com/beego/beego@v1.12.12/router.go:897
2026/02/16 00:54:06.483 [C] [panic.go:884]  /usr/local/go/src/net/http/server.go:2936
2026/02/16 00:54:06.483 [C] [panic.go:884]  /usr/local/go/src/net/http/server.go:1995
2026/02/16 00:54:06.483 [C] [panic.go:884]  /usr/local/go/src/runtime/asm_amd64.s:1598

To fix that, we have to add the tzdata package installer to the Dockerfile.

@pawelmarkowski pawelmarkowski changed the title Fix dockerfile missing package [Fix]: dockerfile missing package (tzdata) Feb 16, 2026
@pawelmarkowski pawelmarkowski changed the title [Fix]: dockerfile missing package (tzdata) Fix: dockerfile missing package (tzdata) Feb 16, 2026
@hsluoyz hsluoyz requested a review from Copilot February 16, 2026 08:31
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a runtime panic in the Docker container by adding the missing tzdata package to the Alpine Linux base image. The application uses time.LoadLocation("Asia/Singapore") in the util.GetCurrentTime() function, which requires timezone data that Alpine doesn't include by default.

Changes:

  • Added tzdata package to the Alpine package installation in the Dockerfile

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@hsluoyz hsluoyz changed the title Fix: dockerfile missing package (tzdata) feat: fix dockerfile missing package (tzdata) Feb 16, 2026
@hsluoyz hsluoyz merged commit 17244fa into apache:master Feb 16, 2026
11 of 12 checks passed
@github-actions
Copy link

🎉 This PR is included in version 1.72.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@pawelmarkowski pawelmarkowski deleted the fix-dockerfile-missing-package branch February 16, 2026 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants