forked from tdviet/fedcloudclient
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
40 lines (32 loc) · 1.43 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
FROM python:3.9
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# Install IGTF CAs
# hadolint ignore=DL3008,DL3015
RUN curl http://repository.egi.eu/sw/production/cas/1/current/repo-files/egi-trustanchors.list \
> /etc/apt/sources.list.d/egi-trustanchors.list \
&& curl https://dl.igtf.net/distribution/igtf/current/GPG-KEY-EUGridPMA-RPM-3 \
| apt-key add - \
&& apt-get update \
&& apt-get install -y --install-recommends ca-policy-egi-core \
&& rm -rf /var/lib/apt/lists/*
# Install oidc-agent and jq
# hadolint ignore=DL3008
RUN apt-key adv --keyserver hkp://pgp.surfnet.nl --recv-keys ACDFB08FDC962044D87FF00B512839863D487A87 \
&& echo "deb http://repo.data.kit.edu/debian/buster ./" >> /etc/apt/sources.list.d/oidc-agent.list \
&& apt-get update \
&& apt-get install -y --no-install-recommends oidc-agent jq \
&& mkdir -p ~/.config/oidc-agent/ \
&& rm -rf /var/lib/apt/lists/*
# Dependencies
COPY requirements.txt /tmp/fedcloudclient/requirements.txt
RUN pip install --no-cache-dir -r /tmp/fedcloudclient/requirements.txt
# Add IGTF CAs to Python requests
RUN cat /etc/grid-security/certificates/*.pem >> "$(python -m requests.certs)"
# Install fedcloudclient
COPY . /tmp/fedcloudclient
# hadolint ignore=DL3013
RUN pip install --no-cache-dir /tmp/fedcloudclient
# Save site configs
RUN fedcloud site save-config
COPY examples/command_history.txt /root/.bash_history
CMD ["/usr/local/bin/fedcloud"]