Skip to content

Commit f50a923

Browse files
authored
Switch images to Ubuntu noble 24.04 (#277)
* Switch base Ubuntu image to 'noble' version - Correct a typo in README.md - Update Docker sources to use 'noble' - Change base image from Ubuntu 22.04 to 'noble' Adjust UID for coder user in Dockerfiles Remove `ubuntu` user from Dockerfiles Adjust UID for coder user in Dockerfiles Use userdel to remove ubuntu user Use userdel to remove ubuntu user * Update ubuntu.Dockerfile
1 parent e5d0b45 commit f50a923

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This repository contains example images for use with [Coder](https://coder.com/d
44

55
- `enterprise-base`: Contains an example image that can be used as a base for
66
other images.
7-
- `enterprise-minimal`: Contains a minimal image that contians only the required
7+
- `enterprise-minimal`: Contains a minimal image that contains only the required
88
utilities for a Coder workspace to bootstrap successfully.
99

1010
## Images on Docker Hub

images/base/docker.list

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
deb [signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu jammy stable
1+
deb [signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu noble stable

images/base/ubuntu.Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:22.04
1+
FROM ubuntu:noble
22

33
SHELL ["/bin/bash", "-c"]
44
ENV DEBIAN_FRONTEND=noninteractive
@@ -51,8 +51,9 @@ RUN ln -s /usr/libexec/docker/cli-plugins/docker-compose /usr/bin/docker-compose
5151
# Make typing unicode characters in the terminal work.
5252
ENV LANG=en_US.UTF-8
5353

54-
# Add a user `coder` so that you're not developing as the `root` user
55-
RUN useradd coder \
54+
# Remove the `ubuntu` user and add a user `coder` so that you're not developing as the `root` user
55+
RUN userdel -r ubuntu && \
56+
useradd coder \
5657
--create-home \
5758
--shell=/bin/bash \
5859
--groups=docker \

images/minimal/ubuntu.Dockerfile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:22.04
1+
FROM ubuntu:noble
22

33
USER root
44
ENV DEBIAN_FRONTEND=noninteractive
@@ -12,12 +12,15 @@ RUN apt-get update && \
1212
sudo \
1313
&& rm -rf /var/lib/apt/lists/*
1414

15-
RUN useradd coder \
15+
# Make typing unicode characters in the terminal work.
16+
ENV LANG=en_US.UTF-8
17+
# Remove the `ubuntu` user and add a user `coder` so that you're not developing as the `root` user
18+
RUN userdel -r ubuntu && \
19+
useradd coder \
1620
--create-home \
1721
--shell=/bin/bash \
1822
--uid=1000 \
1923
--user-group && \
2024
echo "coder ALL=(ALL) NOPASSWD:ALL" >>/etc/sudoers.d/nopasswd
2125

22-
ENV LANG=en_US.UTF-8
2326
USER coder

0 commit comments

Comments
 (0)