This repository has been archived by the owner on Feb 15, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
68 lines (56 loc) · 3.11 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
# Use jbossdemocentral/developer as the base
FROM jbossdemocentral/developer
# Maintainer details
MAINTAINER Andrew Block, Eric D. Schabell
# Environment Variables
ENV BPMS_HOME /opt/jboss/bpms/jboss-eap-7.0
ENV BPMS_VERSION_MAJOR 6
ENV BPMS_VERSION_MINOR 4
ENV BPMS_VERSION_MICRO 0
ENV BPMS_VERSION_PATCH GA
ENV EAP_VERSION_MAJOR 7
ENV EAP_VERSION_MINOR 0
ENV EAP_VERSION_MICRO 0
ENV EAP_INSTALLER=jboss-eap-$EAP_VERSION_MAJOR.$EAP_VERSION_MINOR.$EAP_VERSION_MICRO-installer.jar
ENV BPMS_DEPLOYABLE=jboss-bpmsuite-$BPMS_VERSION_MAJOR.$BPMS_VERSION_MINOR.$BPMS_VERSION_MICRO.$BPMS_VERSION_PATCH-deployable-eap7.x.zip
# ADD Installation and Management Files
COPY support/installation-eap support/installation-eap.variables installs/$BPMS_DEPLOYABLE installs/$EAP_INSTALLER support/fix-permissions /opt/jboss/
# Update Permissions on Installers
USER root
RUN usermod -g root jboss \
&& chown 1000:1000 /opt/jboss/$EAP_INSTALLER /opt/jboss/$BPMS_DEPLOYABLE
# Prepare and run installer and cleanup installation components
RUN sed -i "s:<installpath>.*</installpath>:<installpath>$BPMS_HOME</installpath>:" /opt/jboss/installation-eap \
&& java -jar /opt/jboss/$EAP_INSTALLER /opt/jboss/installation-eap -variablefile /opt/jboss/installation-eap.variables \
&& unzip -qo /opt/jboss/$BPMS_DEPLOYABLE -d $BPMS_HOME/.. \
&& /opt/jboss/fix-permissions $BPMS_HOME \
&& rm -rf /opt/jboss/$BPMS_DEPLOYABLE /opt/jboss/$EAP_INSTALLER /opt/jboss/installation-eap /opt/jboss/installation-eap.variables $BPMS_HOME/standalone/configuration/standalone_xml_history/ \
&& $BPMS_HOME/bin/add-user.sh -a -r ApplicationRealm -u erics -p bpmsuite1! -ro analyst,admin,appraiser,broker,manager,user,kie-server,kiemgmt,rest-all --silent
# Copy demo and support files
COPY support/bpm-suite-demo-niogit $BPMS_HOME/bin/.niogit
COPY projects /opt/jboss/bpms-projects
COPY support/userinfo.properties $BPMS_HOME/standalone/deployments/business-central.war/WEB-INF/classes/
COPY support/standalone.xml $BPMS_HOME/standalone/configuration/
COPY support/start.sh /opt/jboss/
# Run Demo Maven build and cleanup
RUN mvn clean install -f /opt/jboss/bpms-projects/ZipCodeServices/pom.xml \
&& cp -r /opt/jboss/bpms-projects/ZipCodeServices/target/ZipCodeServices-1.0.war $BPMS_HOME/standalone/deployments/ \
&& chown -R 1000:root $BPMS_HOME \
&& /opt/jboss/fix-permissions $BPMS_HOME/bin/.niogit \
&& /opt/jboss/fix-permissions $BPMS_HOME/standalone/deployments/ZipCodeServices-1.0.war \
&& /opt/jboss/fix-permissions $BPMS_HOME/standalone/configuration/standalone.xml \
&& /opt/jboss/fix-permissions $BPMS_HOME/standalone/deployments/business-central.war/WEB-INF/classes/userinfo.properties \
&& /opt/jboss/fix-permissions /etc/passwd \
&& /opt/jboss/fix-permissions /etc/group \
&& /opt/jboss/fix-permissions /opt/jboss/start.sh \
&& /opt/jboss/fix-permissions /opt/jboss/.m2 \
&& mkdir -p /opt/jboss/.security \
&& /opt/jboss/fix-permissions /opt/jboss/.security \
&& rm -rf /opt/jboss/bpms-projects \
&& chmod +x /opt/jboss/start.sh
# Run as JBoss
USER 1000
# Expose Ports
EXPOSE 9990 9999 8080 9418 8001
# Helper script
ENTRYPOINT ["/opt/jboss/start.sh"]