Closed agyss closed 9 months ago
@agyss Thanks for reporting this!
This bug reproduces consistently on the mcr ubuntu family of images due to weird time zone /etc/localtime
file. (In other images its working fine.)
command:
docker run -it mcr.microsoft.com/devcontainers/base:debian ls /etc/localtime -l
results:
lrwxrwxrwx 1 root root 27 Sep 4 00:00 /etc/localtime -> /usr/share/zoneinfo/Etc/UTC
However when running on mcr ubuntu:
command:
docker run -it mcr.microsoft.com/devcontainers/base:ubuntu-22.04 ls /etc/localtime -l
results:
lrwxrwxrwx 1 root root 24 Sep 1 23:59 /etc/localtime -> /usr/share/zoneinfo//UTC
Notice the extra /
in before the UTC part.
this causes os.readlink
method of python (used in babel here ) to incorrectly resolve the link to the localtime path.
This can either be a bug in the mcr.microsoft.com/devcontainers/base:ubuntu
image family creation, or a bug in babel
that incorrectly relies on os.readlink.
As a quick fix I can add an explicit TZ=UTC environment variable to the mkdocs feature, but It looks like the same problem could appear in all python programs running on these mcr ubuntu containers
@agyss try ghcr.io/devcontainers-contrib/features/mkdocs:2.0.18
for the workaround fix
Feature id and version
latest version of mkdocs fails with babel error
Devcontainer base Image
mcr.microsoft.com/vscode/devcontainers/base:ubuntu-22.04
What happened?
Steps to reproduce:
mkdocs new test
cd test
mkdocs serve
to serve newly created documentation to localhostExpected behavior:
Newly created documentation is served to localhost and accessible via the browser.
Actual behavior:
Error log:
Relevant log output