Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
Dockerfiles for Jenkins
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pierre-Yves David
Dockerfiles for Jenkins
Commits
00bc903d
Commit
00bc903d
authored
1 year ago
by
Nicolas Dandrimont
Browse files
Options
Downloads
Patches
Plain Diff
Install rust(up) in the bookworm-multipython image
parent
55d1056b
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bookworm-multipython/Dockerfile
+16
-0
16 additions, 0 deletions
bookworm-multipython/Dockerfile
bookworm-multipython/prepare-cargo-cache
+15
-0
15 additions, 0 deletions
bookworm-multipython/prepare-cargo-cache
with
31 additions
and
0 deletions
bookworm-multipython/Dockerfile
+
16
−
0
View file @
00bc903d
...
...
@@ -177,6 +177,20 @@ RUN curl -sL https://raw.githubusercontent.com/ocaml/opam/master/shell/install.s
ln
-s
opam-
*
opam
&&
\
rm
/tmp/opam-install
# Install rustup and the default rust toolchain
ENV
CARGO_HOME="/home/${user}/.cargo"
ENV
RUSTUP_HOME="/home/${user}/.rustup"
RUN
curl
--proto
'=https'
--tlsv1
.2
-sSf
https://sh.rustup.rs
-o
/tmp/rustup-init.sh
&&
\
chmod
+x /tmp/rustup-init.sh
&&
\
/tmp/rustup-init.sh
-y
&&
\
rm
/tmp/rustup-init.sh
ENV
PATH="${CARGO_HOME}/bin:${PATH}"
COPY
./prepare-cargo-cache ${CARGO_HOME}/bin
# install rage (for swh-alter)
FROM
rust:slim-bookworm
as
build_rage
...
...
@@ -265,6 +279,8 @@ RUN pyenv global ${py37_version} ${py38_version} ${py39_version} ${py310_version
ENV
SWH_PYTHON_FOR_GLOBAL_TOOLS python3.11
RUN
mkdir
/home/
${
user
}
/.cache
## vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv ##
# inlined from https://raw.githubusercontent.com/jenkinsci/docker-agent/4.13.3-2/11/bullseye/Dockerfile
#
...
...
This diff is collapsed.
Click to expand it.
bookworm-multipython/prepare-cargo-cache
0 → 100755
+
15
−
0
View file @
00bc903d
#!/bin/bash
# Make sure cargo cache directories are properly moved to ~/.cache so they can
# stay around for subsequent runs
#
# See https://doc.rust-lang.org/nightly/cargo/guide/cargo-home.html#caching-the-cargo-home-in-ci
set
-ex
for
dir
in
registry/index/ registry/cache/ git/db/
;
do
base
=
"
$(
dirname
$dir
)
"
mkdir
-p
"
${
HOME
}
/.cargo/
$base
"
mkdir
-p
"
${
HOME
}
/.cache/cargo/
$dir
"
rm
-rf
"
${
HOME
}
/.cargo/
${
dir
#/
}
"
ln
-s
"
${
HOME
}
/.cache/cargo/
$dir
"
"
${
HOME
}
/.cargo/
$base
/"
done
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