-
Notifications
You must be signed in to change notification settings - Fork 11
/
Dockerfile
77 lines (68 loc) · 2.49 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
66
67
68
69
70
71
72
73
74
75
76
77
FROM postgres:10
MAINTAINER Michael J. Stealey <[email protected]>
ENV IRODS_VERSION=4.2.1
# set user/group IDs for irods account
RUN groupadd -r irods --gid=998 \
&& useradd -r -g irods -d /var/lib/irods --uid=998 irods \
&& mv /docker-entrypoint.sh /postgres-docker-entrypoint.sh
# install iRODS 4.2.1
RUN echo "deb http://ftp.debian.org/debian jessie-backports main" \
> /etc/apt/sources.list.d/jessie-backports.list \
&& apt-get update && apt-get install -y \
wget \
gnupg2 \
apt-transport-https \
sudo \
jq \
libxml2 \
moreutils \
&& wget -qO - https://packages.irods.org/irods-signing-key.asc | apt-key add - \
&& echo "deb [arch=amd64] https://packages.irods.org/apt/ trusty main" \
> /etc/apt/sources.list.d/renci-irods.list \
&& apt-get update && apt-get install -y \
irods-database-plugin-postgres=${IRODS_VERSION} \
irods-icommands=${IRODS_VERSION} \
irods-runtime=${IRODS_VERSION} \
irods-server=${IRODS_VERSION}
# default iRODS and PostgreSQL environment variables
ENV IRODS_SERVICE_ACCOUNT_NAME=irods \
IRODS_SERVICE_ACCOUNT_GROUP=irods \
IRODS_SERVER_ROLE=1 \
ODBC_DRIVER_FOR_POSTGRES=2 \
IRODS_DATABASE_SERVER_HOSTNAME=localhost \
IRODS_DATABASE_SERVER_PORT=5432 \
IRODS_DATABASE_NAME=ICAT \
IRODS_DATABASE_USER_NAME=irods \
IRODS_DATABASE_PASSWORD=temppassword \
IRODS_DATABASE_USER_PASSWORD_SALT=tempsalt \
IRODS_ZONE_NAME=tempZone \
IRODS_PORT=1247 \
IRODS_PORT_RANGE_BEGIN=20000 \
IRODS_PORT_RANGE_END=20199 \
IRODS_CONTROL_PLANE_PORT=1248 \
IRODS_SCHEMA_VALIDATION=file:///var/lib/irods/configuration_schemas \
IRODS_SERVER_ADMINISTRATOR_USER_NAME=rods \
IRODS_SERVER_ZONE_KEY=TEMPORARY_zone_key \
IRODS_SERVER_NEGOTIATION_KEY=TEMPORARY_32byte_negotiation_key \
IRODS_CONTROL_PLANE_KEY=TEMPORARY__32byte_ctrl_plane_key \
IRODS_SERVER_ADMINISTRATOR_PASSWORD=rods \
IRODS_VAULT_DIRECTORY=/var/lib/irods/iRODS/Vault \
UID_POSTGRES=999 \
GID_POSTGRES=999 \
UID_IRODS=998 \
GID_IRODS=998 \
POSTGRES_USER=postgres \
POSTGRES_PASSWORD=postgres
# create postgresql.tar.gz
RUN cd /var/lib/postgresql/data \
&& tar -czvf /postgresql.tar.gz . \
&& cd /
# create irods.tar.gz
RUN cd /var/lib/irods \
&& tar -czvf /irods.tar.gz . \
&& cd /
COPY ./docker-entrypoint.sh /irods-docker-entrypoint.sh
VOLUME /var/lib/irods /etc/irods /var/lib/postgresql/data
EXPOSE $IRODS_PORT $IRODS_CONTROL_PLANE_PORT $IRODS_PORT_RANGE_BEGIN-$IRODS_PORT_RANGE_END
WORKDIR /var/lib/irods/
ENTRYPOINT ["/irods-docker-entrypoint.sh"]