-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
55 lines (45 loc) · 2.11 KB
/
Dockerfile
File metadata and controls
55 lines (45 loc) · 2.11 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
FROM stackinabox/ibm-supervisord:3.2.2
MAINTAINER Sudhakar Frederick <sudhakar@au1.ibm.com>
# Pass in the location of the UCD install zip
ARG ARTIFACT_DOWNLOAD_URL
ARG ARTIFACT_VERSION
# Add startup.sh script and addtional supervisord config
ADD startup.sh /opt/startup.sh
ADD supervisord.conf /tmp/supervisord.conf
# ADD wait-for-it.sh script
ADD wait-for-it.sh /usr/local/bin
#Copy in database setup scripts
COPY ./ucddbinstall /opt/ucd/ucddbinstall/
# Copy in installation properties
ADD install.properties /tmp/install.properties
# Expose Ports
EXPOSE 8080
EXPOSE 8443
EXPOSE 7918
ENV LICENSE=${LICENSE:-} \
DATABASE_USER=${DATABASE_USER:-ibm_ucd} \
DATABASE_PASS=${DATABASE_PASS:-passw0rd} \
DATABASE_NAME=${DATABASE_NAME:-ibm_ucd} \
DATABASE_PORT=${DATABASE_PORT:-3306} \
DATABASE_HOST=${DATABASE_HOST:-localhost} \
DEPLOY_SERVER_URL=${DEPLOY_SERVER_URL:-http://localhost:8080} \
DEPLOY_SERVER_HOSTNAME=${DEPLOY_SERVER_HOSTNAME:-localhost} \
DEPLOY_SERVER_AUTH_TOKEN=${DEPLOY_SERVER_AUTH_TOKEN:-} \
RCL_URL=${RCL_URL:-"27000@licenses.example.com"} \
ADD_CLOUD_AGENT_PKGS=${ADD_CLOUD_AGENT_PKGS:-}
# install the UCD Server and remove the install files.
RUN mkdir -p /cache && \
wget -q $ARTIFACT_DOWNLOAD_URL && \
unzip -q ibm-ucd-$ARTIFACT_VERSION.zip -d /tmp && \
cat /tmp/install.properties >> /tmp/ibm-ucd-install/install.properties && \
sh /opt/ucd/ucddbinstall/replaceAntSQL.sh /tmp/ibm-ucd-install && \
cp /opt/ucd/ucddbinstall/*.jar /tmp/ibm-ucd-install/lib/ext/ && \
sh /tmp/ibm-ucd-install/install-server.sh && \
grep ZSQLFILE /tmp/ibm-ucd-install/install.log | cut -f 3- -d '_' > /opt/ucd/ucddbinstall/runsqls.txt && \
grep ZSQLSTMTBEGIN /tmp/ibm-ucd-install/install.log | cut -f2- -d '_' > /opt/ucd/ucddbinstall/execsql.sql && \
chmod +x /opt/ucd/ucddbinstall/install-db.sh /opt/startup.sh && \
cp -r /tmp/ibm-ucd-install/database /opt/ucd/ucddbinstall/ && \
cat /tmp/supervisord.conf >> /etc/supervisor/conf.d/supervisord.conf && \
rm -rf /tmp/ibm-ucd-install /tmp/install.properties /tmp/supervisord.conf ibm-ucd-$ARTIFACT_VERSION.zip
ENTRYPOINT ["/opt/startup.sh"]
CMD []