Skip to content

Commit 7830ad2

Browse files
Kaniska244Copilot
andauthored
[base-ubuntu] - Fix for issue with timezone data in buildpack-deps ubuntu images. (#1727)
* [base-ubuntu] - Fix for issue with timezone data in `buildpack-deps` ubuntu images. * Added test * Update src/base-ubuntu/.devcontainer/Dockerfile Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 9876f5f commit 7830ad2

3 files changed

Lines changed: 8 additions & 1 deletion

File tree

src/base-ubuntu/.devcontainer/Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,9 @@ RUN if [ "$VARIANT" = "noble" ]; then \
1515
# [Optional] Uncomment this section to install additional OS packages.
1616
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
1717
# && apt-get -y install --no-install-recommends <your-package-list-here>
18+
19+
# Local fix for issue with timezone data at 'buildpack-deps'. Ref# https://github.com/devcontainers/images/issues/1709
20+
RUN apt-get update \
21+
&& export DEBIAN_FRONTEND=noninteractive \
22+
&& apt-get -y reinstall --no-install-recommends tzdata \
23+
&& rm -rf /var/lib/apt/lists/*

src/base-ubuntu/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "2.1.3",
2+
"version": "2.1.4",
33
"variants": [
44
"noble",
55
"jammy"

src/base-ubuntu/test-project/test.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ check "set-git-config-user-name" sh -c "sudo git config --system user.name devco
1818
check "gitconfig-file-location" sh -c "ls /etc/gitconfig"
1919
check "gitconfig-contains-name" sh -c "cat /etc/gitconfig | grep 'name = devcontainers'"
2020
check "usr-local-etc-config-does-not-exist" test ! -f "/usr/local/etc/gitconfig"
21+
check "verify-timezone-data" sh -c "cat /etc/timezone | grep 'Etc/UTC'"
2122

2223
check_ubuntu_user() {
2324
if ! id -u ubuntu > /dev/null 2>&1; then

0 commit comments

Comments
 (0)