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
32c1e011
Verified
Commit
32c1e011
authored
1 month ago
by
Louis
Browse files
Options
Downloads
Patches
Plain Diff
Remove subuser commands
parent
10afe6e0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#724
failed with stage
Stage:
in 1 minute
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Dockerfile
+0
-14
0 additions, 14 deletions
Dockerfile
with
0 additions
and
14 deletions
Dockerfile
+
0
−
14
View file @
32c1e011
FROM
docker:20.10-dind
AS
docker_host
FROM
debian:trixie
ARG
USERNAME=rustbuilder
ARG
USER_UID=1000
ARG
USER_GID=$USER_UID
ARG
RUST_VERSION
ARG
NODE_VERSION
ENV
RUST_VERSION=${RUST_VERSION:-1.84}
ENV
NODE_VERSION=${NODE_VERSION:-22.11.0}
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 libpq-dev libsqlite3-dev
&&
\
rm
-rf
/var/lib/apt/lists/
*
RUN
echo
$USERNAME
ALL
=
\(
root
\)
NOPASSWD:ALL
>
/etc/sudoers.d/
$USERNAME
&&
\
chmod
0440 /etc/sudoers.d/
$USERNAME
USER
$USERNAME
ENV
NVM_DIR=/home/${USERNAME}/.nvm
RUN
curl
-o-
https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
...
...
@@ -41,6 +29,4 @@ RUN cargo install cross --git https://github.com/cross-rs/cross
COPY
--from=docker_host /usr/local/bin/docker /usr/local/bin/docker
ENV
CROSS_CONTAINER_IN_CONTAINER=true
ENV
CROSS_CONTAINER_UID=${USER_UID}
ENV
CROSS_CONTAINER_GID=${USER_GID}
ENV
PATH="${PATH}:/home/${USERNAME}/.cargo/bin:${NVM_DIR}/versions/node/v${NODE_VERSION}/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