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
Container Registry
Model registry
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
Platform
Infrastructure
Software Heritage virtual environment packaging manifests
Commits
00b00357
Unverified
Commit
00b00357
authored
2 months ago
by
Antoine R. Dumont
Browse files
Options
Downloads
Patches
Plain Diff
scrubber: Adapt image to reuse the swh-base image
Refs.
sysadm-environment#5560
parent
5b35b0d0
No related branches found
No related tags found
1 merge request
!51
swh-apps: Bump swh-* images to use python:3.11-bookworm
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
apps/swh-scrubber/Dockerfile
+10
-25
10 additions, 25 deletions
apps/swh-scrubber/Dockerfile
with
10 additions
and
25 deletions
apps/swh-scrubber/Dockerfile
+
10
−
25
View file @
00b00357
# Deeply inspired from the Dockerfile of the swh-graph project
FROM
python:3.11-bookworm
ARG
REGISTRY=container-registry.softwareheritage.org/swh/infra/swh-apps/
ARG
base_image=${REGISTRY}swh-base
ARG
base_image_version=latest
FROM
${base_image}:${base_image_version}
ARG
userid=1000
ARG
groupid=1000
ARG
user=swh
ARG
workdir=/opt/${user}
ARG
venv=${workdir}/venv
ARG
configdir=/etc/${user}
RUN
apt-get
-y
update
&&
\
apt-get
-y
upgrade
&&
\
apt-get
install
-y
libcmph-dev librdkafka-dev
&&
\
apt clean
&&
\
addgroup
--gid
${
userid
}
swh
&&
\
useradd
--gid
${
groupid
}
--uid
${
userid
}
-m
-d
${
workdir
}
${
user
}
&&
\
mkdir
${
configdir
}
USER
swh
RUN
python
-m
venv
${
venv
}
WORKDIR
${workdir}
ENV
PYTHONPATH=${venv}
ENV
PATH=${venv}/bin:$PATH
RUN
python
-m
pip
install
uv
COPY
--chown=${userid}:${groupid} requirements-frozen.txt ${workdir}
RUN
uv pip
sync
--no-cache
requirements-frozen.txt
COPY
--chmod=0644 requirements-frozen.txt ${workdir}
RUN
--mount
=
type
=
cache,target
=
.cache,uid
=
1000,gid
=
1000
\
uv pip
sync
requirements-frozen.txt
COPY
--chown=${userid}:${groupid} entrypoint.sh ${workdir}
RUN
chmod
u+x
${
workdir
}
/entrypoint.sh
COPY
--chmod=0755 entrypoint.sh ${workdir}
USER
${user}
ENV
SWH_CONFIG_FILENAME=${configdir}/config.yml
ENV
STATSD_PORT=9125
ENV
STATSD_HOST=prometheus-statsd-exporter
...
...
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