Skip to content

Commit e51895b

Browse files
Upgrade to Ubuntu 24.04 Image base (#2131)
* fixed * Update .github/workflows/docker-build-test-upload.yml * Only remove user with uid 1000 if it exists * Update Dockerfile * Update Dockerfile --------- Co-authored-by: Ayaz Salikhov <[email protected]>
1 parent 0098788 commit e51895b

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

.github/workflows/docker-build-test-upload.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ jobs:
7979

8080
- name: Pull base ubuntu image 📥
8181
if: inputs.parent-image == ''
82-
run: docker pull ubuntu:22.04
82+
run: docker pull ubuntu:24.04
8383
shell: bash
8484

8585
- name: Build image 🛠

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ help:
3636

3737

3838
build/%: DOCKER_BUILD_ARGS?=
39-
build/%: ROOT_CONTAINER?=ubuntu:22.04
39+
build/%: ROOT_CONTAINER?=ubuntu:24.04
4040
build/%: ## build the latest image for a stack using the system's architecture
4141
docker build $(DOCKER_BUILD_ARGS) --rm --force-rm --tag "$(REGISTRY)/$(OWNER)/$(notdir $@):latest" "./images/$(notdir $@)" --build-arg REGISTRY="$(REGISTRY)" --build-arg OWNER="$(OWNER)" --build-arg ROOT_CONTAINER="$(ROOT_CONTAINER)"
4242
@echo -n "Built image size: "

images/docker-stacks-foundation/Dockerfile

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Copyright (c) Jupyter Development Team.
22
# Distributed under the terms of the Modified BSD License.
33

4-
# Ubuntu 22.04 (jammy)
5-
# https://hub.docker.com/_/ubuntu/tags?page=1&name=jammy
6-
ARG ROOT_CONTAINER=ubuntu:22.04
4+
# Ubuntu 24.04 (noble)
5+
# https://hub.docker.com/_/ubuntu/tags?page=1&name=noble
6+
ARG ROOT_CONTAINER=ubuntu:24.04
77

88
FROM $ROOT_CONTAINER
99

@@ -68,6 +68,12 @@ RUN sed -i 's/^#force_color_prompt=yes/force_color_prompt=yes/' /etc/skel/.bashr
6868
# and docs: https://docs.conda.io/projects/conda/en/latest/dev-guide/deep-dives/activation.html
6969
echo 'eval "$(conda shell.bash hook)"' >> /etc/skel/.bashrc
7070

71+
# Delete existing user with UID="${NB_UID}" if it exists
72+
# hadolint ignore=SC2046
73+
RUN if grep -q "${NB_UID}" /etc/passwd; then \
74+
userdel --remove $(id -un "${NB_UID}"); \
75+
fi
76+
7177
# Create "${NB_USER}" user (`jovyan` by default) with UID="${NB_UID}" (`1000` by default) and in the 'users' group
7278
# and make sure these dirs are writable by the `users` group.
7379
RUN echo "auth requisite pam_deny.so" >> /etc/pam.d/su && \

0 commit comments

Comments
 (0)