Skip to content

Commit 63363a5

Browse files
authored
chore: install just in the devcontainer for Linux development (#1375)
Apparently `just` was added to `apt` in Ubuntu 24, so this required updating the Ubuntu version in the `Dockerfile` to make it so we could simply `apt install just`. Though then that caused a conflict with the custom `dev` user we were using, though the end result seems simpler since now we just use the default `ubuntu` user provided by Ubuntu 24.
1 parent 6d65010 commit 63363a5

File tree

2 files changed

+8
-13
lines changed

2 files changed

+8
-13
lines changed

.devcontainer/Dockerfile

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

33
ARG DEBIAN_FRONTEND=noninteractive
44
# enable 'universe' because musl-tools & clang live there
@@ -11,20 +11,17 @@ RUN apt-get update && \
1111
RUN apt-get update && \
1212
apt-get install -y --no-install-recommends \
1313
build-essential curl git ca-certificates \
14-
pkg-config clang musl-tools libssl-dev && \
14+
pkg-config clang musl-tools libssl-dev just && \
1515
rm -rf /var/lib/apt/lists/*
1616

17-
# non-root dev user
18-
ARG USER=dev
19-
ARG UID=1000
20-
RUN useradd -m -u $UID $USER
21-
USER $USER
17+
# Ubuntu 24.04 ships with user 'ubuntu' already created with UID 1000.
18+
USER ubuntu
2219

2320
# install Rust + musl target as dev user
2421
RUN curl -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal && \
2522
~/.cargo/bin/rustup target add aarch64-unknown-linux-musl && \
2623
~/.cargo/bin/rustup component add clippy rustfmt
2724

28-
ENV PATH="/home/${USER}/.cargo/bin:${PATH}"
25+
ENV PATH="/home/ubuntu/.cargo/bin:${PATH}"
2926

3027
WORKDIR /workspace

.devcontainer/devcontainer.json

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,13 @@
1515
"CARGO_TARGET_DIR": "${containerWorkspaceFolder}/codex-rs/target-arm64"
1616
},
1717

18-
"remoteUser": "dev",
18+
"remoteUser": "ubuntu",
1919
"customizations": {
2020
"vscode": {
2121
"settings": {
22-
"terminal.integrated.defaultProfile.linux": "bash"
22+
"terminal.integrated.defaultProfile.linux": "bash"
2323
},
24-
"extensions": [
25-
"rust-lang.rust-analyzer"
26-
],
24+
"extensions": ["rust-lang.rust-analyzer"]
2725
}
2826
}
2927
}

0 commit comments

Comments
 (0)