Add documentation for Alpine Linux Docker usage #199
Merged
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.
Alpine Linux doesn't include timezone data by default, causing
LookupError: Unknown timezone UTCwhen babel attempts to resolve timezones.Changes
docs/howto/use-in-alpine-docker.mdexplaining the issue and fixmkdocs.ymlnavigation to include new guideSolution
Install
tzdatain Alpine-based Docker images:RUN apk add --no-cache tzdataOriginal prompt
This section details on the original issue you should resolve
<issue_title>v1.5.0 breaks builds with alpine</issue_title>
<issue_description>When upgrading to v2.5.0, I get the following error when using an alpine base image
Versions
Stacktrace
Tried workaround
I tried installing tzdata on system level:
tzdatapackageTZ=UTCenv variableWhich did not seem to work</issue_description>
<agent_instructions>The user suggested updating the docs on how to use it on alpine docker. See the
docs/folder and add the info in the right spot. Note we use mkdocs-material so you can syntax like code blocks and admonitions. </agent_instructions>Comments on the Issue (you are @copilot in this section)
@timvink Alpine Linux, being a minimal distribution, often omits the standard timezone information to keep the image small. The Python `babel` library (used by mkdocs_git_revision_date_localized_plugin) relies on this system-level timezone data to function correctly.You need to add
tzdatato your buildYou can also try adding the
pytzandtzdatapython packages, but I think the above will already resolve it. </comment_new><comment_new>@timvink
Here are the changes: https://github.com/timvink/mkdocs-git-revision-date-localized-plugin/pull/193/files#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711
So installing
tzdatashould do the trick. Did you manage to fix it?💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.