-
Notifications
You must be signed in to change notification settings - Fork 46
/
Dockerfile
65 lines (56 loc) · 2.16 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# This file is part of REANA.
# Copyright (C) 2024 CERN.
#
# REANA is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
# Use Ubuntu LTS base image
FROM docker.io/library/ubuntu:24.04
# Use default answers in installation commands
ENV DEBIAN_FRONTEND=noninteractive
# Allow pip to install packages in the system site-packages dir
ENV PIP_BREAK_SYSTEM_PACKAGES=true
# Add sources to `/code` and work there
WORKDIR /code
COPY . /code
# Install system dependencies and reana-client in one go
# hadolint ignore=DL3008,DL3013
RUN apt-get update -y && \
apt-get install --no-install-recommends -y \
gcc \
git \
libpython3.12 \
python3-pip \
python3.12 \
python3.12-dev && \
pip3 install --no-cache-dir '.[tests]' && \
apt-get remove -y \
gcc \
python3.12-dev && \
apt-get autoremove -y && \
apt-get clean && \
rm -rf /code /var/lib/apt/lists/*
# Delete default `ubuntu` user, as its UID (1000) clashes with REANA's default one
# See https://bugs.launchpad.net/cloud-images/+bug/2005129
RUN userdel -r ubuntu
# Run container as `reana` user with UID `1000`, which should match
# current host user in most situations
# hadolint ignore=DL3059
RUN useradd --uid 1000 --gid 0 --create-home reana && \
chown -R reana:root /home/reana
WORKDIR /home/reana
# Run reana-client upon entry
USER reana
ENTRYPOINT ["reana-client"]
# Set image labels
LABEL org.opencontainers.image.authors="[email protected]"
LABEL org.opencontainers.image.created="2024-03-14"
LABEL org.opencontainers.image.description="REANA reproducible analysis platform - command-line client"
LABEL org.opencontainers.image.documentation="https://reana-client.readthedocs.io/"
LABEL org.opencontainers.image.licenses="MIT"
LABEL org.opencontainers.image.source="https://github.com/reanahub/reana-client"
LABEL org.opencontainers.image.title="reana-client"
LABEL org.opencontainers.image.url="https://github.com/reanahub/reana-client"
LABEL org.opencontainers.image.vendor="reanahub"
# x-release-please-start-version
LABEL org.opencontainers.image.version="0.95.0-alpha.2"
# x-release-please-end