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.
This commit is contained in:
Michael Bolin
2025-06-24 17:20:53 -07:00
committed by GitHub
parent 6d65010aad
commit 63363a54e5
2 changed files with 8 additions and 13 deletions

View File

@@ -1,4 +1,4 @@
FROM ubuntu:22.04 FROM ubuntu:24.04
ARG DEBIAN_FRONTEND=noninteractive ARG DEBIAN_FRONTEND=noninteractive
# enable 'universe' because musl-tools & clang live there # enable 'universe' because musl-tools & clang live there
@@ -11,20 +11,17 @@ RUN apt-get update && \
RUN apt-get update && \ RUN apt-get update && \
apt-get install -y --no-install-recommends \ apt-get install -y --no-install-recommends \
build-essential curl git ca-certificates \ build-essential curl git ca-certificates \
pkg-config clang musl-tools libssl-dev && \ pkg-config clang musl-tools libssl-dev just && \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*
# non-root dev user # Ubuntu 24.04 ships with user 'ubuntu' already created with UID 1000.
ARG USER=dev USER ubuntu
ARG UID=1000
RUN useradd -m -u $UID $USER
USER $USER
# install Rust + musl target as dev user # install Rust + musl target as dev user
RUN curl -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal && \ RUN curl -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal && \
~/.cargo/bin/rustup target add aarch64-unknown-linux-musl && \ ~/.cargo/bin/rustup target add aarch64-unknown-linux-musl && \
~/.cargo/bin/rustup component add clippy rustfmt ~/.cargo/bin/rustup component add clippy rustfmt
ENV PATH="/home/${USER}/.cargo/bin:${PATH}" ENV PATH="/home/ubuntu/.cargo/bin:${PATH}"
WORKDIR /workspace WORKDIR /workspace

View File

@@ -15,15 +15,13 @@
"CARGO_TARGET_DIR": "${containerWorkspaceFolder}/codex-rs/target-arm64" "CARGO_TARGET_DIR": "${containerWorkspaceFolder}/codex-rs/target-arm64"
}, },
"remoteUser": "dev", "remoteUser": "ubuntu",
"customizations": { "customizations": {
"vscode": { "vscode": {
"settings": { "settings": {
"terminal.integrated.defaultProfile.linux": "bash" "terminal.integrated.defaultProfile.linux": "bash"
}, },
"extensions": [ "extensions": ["rust-lang.rust-analyzer"]
"rust-lang.rust-analyzer"
],
} }
} }
} }