Skip to content

Commit

Permalink
Switch images to Ubuntu noble 24.04 (#277)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
matifali authored Sep 19, 2024
1 parent e5d0b45 commit f50a923
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This repository contains example images for use with [Coder](https://coder.com/d

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

## Images on Docker Hub
Expand Down
2 changes: 1 addition & 1 deletion images/base/docker.list
Original file line number Diff line number Diff line change
@@ -1 +1 @@
deb [signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu jammy stable
deb [signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu noble stable
7 changes: 4 additions & 3 deletions images/base/ubuntu.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:22.04
FROM ubuntu:noble

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

# Add a user `coder` so that you're not developing as the `root` user
RUN useradd coder \
# Remove the `ubuntu` user and add a user `coder` so that you're not developing as the `root` user
RUN userdel -r ubuntu && \
useradd coder \
--create-home \
--shell=/bin/bash \
--groups=docker \
Expand Down
9 changes: 6 additions & 3 deletions images/minimal/ubuntu.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:22.04
FROM ubuntu:noble

USER root
ENV DEBIAN_FRONTEND=noninteractive
Expand All @@ -12,12 +12,15 @@ RUN apt-get update && \
sudo \
&& rm -rf /var/lib/apt/lists/*

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

ENV LANG=en_US.UTF-8
USER coder

0 comments on commit f50a923

Please sign in to comment.