Skip to content

Commit

Permalink
Upgrade to Ubuntu 24.04 Image base (#2131)
Browse files Browse the repository at this point in the history
* 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 <mathbunnyru@users.noreply.github.com>
  • Loading branch information
jmcgrath207 and mathbunnyru authored Aug 30, 2024
1 parent 0098788 commit e51895b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker-build-test-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:

- name: Pull base ubuntu image 📥
if: inputs.parent-image == ''
run: docker pull ubuntu:22.04
run: docker pull ubuntu:24.04
shell: bash

- name: Build image 🛠
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ help:


build/%: DOCKER_BUILD_ARGS?=
build/%: ROOT_CONTAINER?=ubuntu:22.04
build/%: ROOT_CONTAINER?=ubuntu:24.04
build/%: ## build the latest image for a stack using the system's architecture
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)"
@echo -n "Built image size: "
Expand Down
12 changes: 9 additions & 3 deletions images/docker-stacks-foundation/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.

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

FROM $ROOT_CONTAINER

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

# Delete existing user with UID="${NB_UID}" if it exists
# hadolint ignore=SC2046
RUN if grep -q "${NB_UID}" /etc/passwd; then \
userdel --remove $(id -un "${NB_UID}"); \
fi

# Create "${NB_USER}" user (`jovyan` by default) with UID="${NB_UID}" (`1000` by default) and in the 'users' group
# and make sure these dirs are writable by the `users` group.
RUN echo "auth requisite pam_deny.so" >> /etc/pam.d/su && \
Expand Down

0 comments on commit e51895b

Please sign in to comment.