Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
Software Heritage virtual environment packaging manifests
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
Terraform modules
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
Antoine Lambert
Software Heritage virtual environment packaging manifests
Commits
5694a78d
Verified
Commit
5694a78d
authored
7 months ago
by
Antoine R. Dumont
Browse files
Options
Downloads
Patches
Plain Diff
graph: Default docker image to an official rust image
Refs.
swh/infra/sysadm-environment#5382
parent
568c59ea
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
apps/swh-graph/Dockerfile
+7
-18
7 additions, 18 deletions
apps/swh-graph/Dockerfile
with
7 additions
and
18 deletions
apps/swh-graph/Dockerfile
+
7
−
18
View file @
5694a78d
# Deeply inspired from the Dockerfile of the swh-graphql project
FROM
python:3.11
-bookworm
FROM
rust:1.80
-bookworm
ARG
UID=1000
ARG
GID=1000
RUN
apt-get
-y
update
&&
\
apt-get
-y
upgrade
&&
\
apt-get
install
-y
libcmph-dev librdkafka-dev
\
apt-get
install
-y
python3 python3-pip
\
libcmph-dev librdkafka-dev
\
build-essential libclang-dev
\
zstd protobuf-compiler
&&
\
zstd protobuf-compiler
default-jre
&&
\
apt clean
&&
\
addgroup
--gid
$UID
swh
&&
\
useradd
--gid
$GID
--uid
$UID
-m
-d
/opt/swh swh
&&
\
...
...
@@ -21,25 +22,13 @@ COPY --chown=swh:swh requirements-frozen.txt /opt/swh
ENV
PYTHONPATH=/opt/swh
ENV
PATH=/opt/swh/.local/bin:$PATH
RUN
/usr/local/bin/python
-m
pip
install
--upgrade
pip
&&
\
pip
install
--no-cache-dir
-r
requirements-frozen.txt
# Install rustup and the default rust toolchain
ENV
CARGO_HOME="/opt/swh/.cargo"
ENV
RUSTUP_HOME="/opt/swh/.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}"
RUN
/usr/bin/python3
-m
pip
install
--upgrade
pip
--break-system-packages
&&
\
pip
install
--no-cache-dir
-r
requirements-frozen.txt
--break-system-packages
# Install
RUN
RUSTFLAGS
=
"-C target-cpu=native"
\
cargo
install
--git
https://gitlab.softwareheritage.org/swh/devel/swh-graph.git
\
cargo
install
\
--features
grpc-server
\
swh-graph
...
...
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