Skip to content
Permalink
Newer
Older
100644 68 lines (49 sloc) 1.84 KB
1
#
2
# Building assumes midpoint-3.9-SNAPSHOT-dist.tar.gz is present in the current directory.
3
#
4
5
FROM tier/shibboleth_sp
6
7
MAINTAINER info@evolveum.com
8
9
# TODO switch to other appropriate Java implementation
10
11
RUN yum -y install java-1.8.0-openjdk
12
13
# Build arguments
14
15
ARG MP_VERSION=3.9-SNAPSHOT
16
ARG MP_DIST_FILE=midpoint-${MP_VERSION}-dist.tar.gz
17
18
ENV MP_DIR=/opt/midpoint
19
20
# Copying files
21
22
RUN mkdir -p ${MP_DIR}/var
23
COPY ${MP_DIST_FILE} ${MP_DIR}
24
COPY container_files/ ${MP_DIR}/
25
RUN echo 'Extracting midPoint archive...' \
26
&& tar xzf ${MP_DIR}/midpoint-${MP_VERSION}-dist.tar.gz -C ${MP_DIR} --strip-components=1
27
28
VOLUME ${MP_DIR}/var
29
30
# Repository parameters
31
32
ENV REPO_HOST midpoint-data
33
ENV REPO_PORT 3306
34
ENV REPO_USER root
35
ENV REPO_DATABASE midpoint
36
ENV REPO_JDBC_URL default
37
ENV REPO_PASSWORD_FILE /run/secrets/m_database_password.txt
38
ENV REPO_DATABASE_TYPE mariadb
39
40
ENV KEYSTORE_PASSWORD_FILE /run/secrets/m_keystore_password.txt
41
42
# Logging parameters
43
44
ENV COMPONENT midpoint
45
ENV LOGFILE midpoint.log
46
ENV ENV demo
47
ENV USERTOKEN $MP_VERSION
48
49
# Other parameters
50
51
ENV MEM 2048M
52
53
# Execution
54
55
CMD java -Xmx$MEM -Xms2048M -Dfile.encoding=UTF8 \
56
-Dmidpoint.home=$MP_DIR/var \
57
-Dmidpoint.repository.database=$REPO_DATABASE_TYPE \
58
-Dmidpoint.repository.jdbcUsername=$REPO_USER \
59
-Dmidpoint.repository.jdbcPassword_FILE=$REPO_PASSWORD_FILE \
60
-Dmidpoint.repository.jdbcUrl="`$MP_DIR/repository-url`" \
61
-Dmidpoint.repository.hibernateHbm2ddl=none \
62
-Dmidpoint.repository.missingSchemaAction=create \
63
-Dmidpoint.repository.initializationFailTimeout=60000 \
64
-Dmidpoint.keystore.keyStorePassword_FILE=$KEYSTORE_PASSWORD_FILE \
65
-Dmidpoint.logging.console.enabled=true \
66
-Dmidpoint.logging.console.prefix="`$MP_DIR/log-prefix`" \
67
-Dmidpoint.logging.console.timezone=UTC \
68
-jar $MP_DIR/lib/midpoint.war
You can’t perform that action at this time.