Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Rust CI Image
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Infrastructure Components
Rust CI Image
Commits
6e95d5a6
Verified
Commit
6e95d5a6
authored
3 months ago
by
Louis
Browse files
Options
Downloads
Patches
Plain Diff
Specify rust version by ARG, use non-root user, install binstall and nextest commands
parent
c193f27b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Dockerfile
+20
-6
20 additions, 6 deletions
Dockerfile
with
20 additions
and
6 deletions
Dockerfile
+
20
−
6
View file @
6e95d5a6
FROM
debian:trixie
ENV
CARGO_HOME="$HOME/.cargo"
ARG
USERNAME=rustbuilder
ARG
USER_UID=1000
ARG
USER_GID=$USER_UID
RUN
apt update
&&
\
apt
install
curl wget zip unzip rustup
&&
\
ARG
RUST_VERSION=1.82
RUN
groupadd
--gid
$USER_GID
$USERNAME
\
&&
useradd
--uid
$USER_UID
--gid
$USER_GID
-m
$USERNAME
RUN
apt-get update
&&
\
apt-get
install
-y
sudo
curl wget zip unzip make build-essential clang rustup
&&
\
rm
-rf
/var/lib/apt/lists/
*
RUN
rustup
install
stable
-y
&&
\
rustup default stable
-y
&&
\
RUN
echo
$USERNAME
ALL
=
\(
root
\)
NOPASSWD:ALL
>
/etc/sudoers.d/
$USERNAME
&&
\
chmod
0440 /etc/sudoers.d/
$USERNAME
USER
$USERNAME
RUN
rustup
install
$RUST_VERSION
&&
\
rustup default
$RUST_VERSION
&&
\
rustup
install
nightly
&&
\
cargo
install
junitify
\ No newline at end of file
cargo
install
cargo-binstall junitify cargo-nextest
ENV
PATH=$PATH:/home/$USERNAME/.cargo/bin
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment