forked from cyverse/docker-irods
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
57 lines (40 loc) · 1.62 KB
/
Copy pathDockerfile
File metadata and controls
57 lines (40 loc) · 1.62 KB
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
FROM ubuntu:22.04
### Install iRODS server
ADD --chmod=444 \
https://packages.irods.org/irods-signing-key.asc /etc/apt/trusted.gpg.d/irods-signing-key.asc
COPY --chmod=444 VERSION /IRODS_VERSION
ARG DEBIAN_FRONTEND=noninteractive
RUN --mount=target=/apt-irods,source=apt-irods <<EOF
set -o errexit
apt-get update
apt-get --yes install apt-utils
apt-get --yes install ca-certificates gnupg lsb-release
IFS= read -r irodsVer < /IRODS_VERSION
sed 's/VERSION/'"$irodsVer"'/' /apt-irods > /etc/apt/preferences.d/irods
echo deb [arch=amd64] https://packages.irods.org/apt/ "$(lsb_release --codename --short)" main \
> /etc/apt/sources.list.d/renci-irods.list
# iRODS service account created before iRODS installed so that account will own /var/lib/irods
adduser --group --quiet --system \
--gecos 'iRODS Administrator' --home /var/lib/irods --shell /bin/bash \
irods
apt-get update
apt-get --yes install irods-server rsyslog
### Initialize server
apt-get --yes install jq
jq ".installation_time |= \"$(date '+%Y-%m-%dT%T.%6N')\"" /var/lib/irods/version.json.dist \
> /var/lib/irods/version.json
mkdir /var/lib/irods/.irods
chown --recursive irods:irods /var/lib/irods
### Install dumb-init
apt-get --yes install dumb-init
apt-get clean
### Allow irods user to start rsyslog
echo 'irods ALL=(root) NOPASSWD: /usr/sbin/rsyslogd' > /etc/sudoers.d/rsyslogd
EOF
COPY rsyslog-irods.conf /etc/rsyslog.conf
### Install iRODS management script
COPY --chown=irods:irods --chmod=550 run-irods.sh /run-irods
WORKDIR /var/lib/irods
USER irods
ENV IRODS_CLERVER_PASSWORD=rods
ENTRYPOINT [ "/usr/bin/dumb-init", "--", "/run-irods" ]