-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
82 lines (65 loc) · 3.14 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
78
79
80
81
82
#FROM jboss/wildfly:14.0.1.Final
FROM jboss/wildfly
MAINTAINER DrSnowbird "DrSnowbird@openkbs.org"
###########################
#### ---- Wildfly ---- ####
###########################
ENV JBOSS_HOME=${JBOSS_HOME:-/opt/jboss/wildfly}
###########################
#### ---- Teiid ---- ####
###########################
# Set the TEIID_VERSION env variable
ARG TEIID_VERSION=${TEIID_VERSION:-11.1.1}
ENV TEIID_VERSION=${TEIID_VERSION:-11.1.1}
# Download and unzip Teiid server
# https://oss.sonatype.org/service/local/repositories/releases/content/org/teiid/teiid/11.1.1/teiid-11.1.1-wildfly-dist.zip
RUN cd ${JBOSS_HOME} \
&& curl -O https://oss.sonatype.org/service/local/repositories/releases/content/org/teiid/teiid/${TEIID_VERSION}/teiid-$TEIID_VERSION-wildfly-dist.zip \
&& bsdtar -xf teiid-${TEIID_VERSION}-wildfly-dist.zip \
&& chmod +x ${JBOSS_HOME}/bin/*.sh \
&& rm teiid-${TEIID_VERSION}-wildfly-dist.zip
USER jboss
ENV LAUNCH_JBOSS_IN_BACKGROUND true
# Expose Teiid server ports
EXPOSE 8080 9990 31000 35432
# Run Teiid server and bind to all interface
# CMD ["/bin/sh", "-c", "${JBOSS_HOME}/bin/standalone.sh -c standalone-teiid.xml -b 0.0.0.0 -bmanagement 0.0.0.0"]
###################################
#### ---- Users: setup ---- ####
###################################
## -- setup ManagementRealm password
ARG ADMIN_USER=${ADMIN_USER:-admin}
ENV ADMIN_USER=${ADMIN_USER}
ARG ADMIN_PASSWORD=${ADMIN_PASSWORD:-Password12345_}
ENV ADMIN_PASSWORD=${ADMIN_PASSWORD}
## -- org.jboss.as.domain-add-user: assume
## 1st arg=$admin_user, 2nd_arg=$admin_password, 3rd_arg (default)="ManagementRealm"
## RUN add-user.sh -u user1 -p Password12345_ -r ManagementRealm --silient --enable
RUN /opt/jboss/wildfly/bin/add-user.sh ${ADMIN_USER} ${ADMIN_PASSWORD} --silent --enable
## -- setup ApplicationRealm password
ARG APP_USER=${APP_USER:-user1}
ARG APP_PASSWORD=${APP_PASSWORD:-Password12345_}
ARG APP_GROUP=${APP_GROUP:-"odata,rest"}
ARG APP_REALM=${APP_REALM:-ApplicationRealm}
## RUN add-user.sh -a user1 -p Password12345_ -r ApplicationRealm -g "odata,rest" --silient --enable
RUN /opt/jboss/wildfly/bin/add-user.sh -a ${APP_USER} -p ${APP_PASSWORD} -r ${APP_REALM} -g ${APP_GROUP} --silent --enable
###################################
#### -- Volume: Declaration -- ####
###################################
#VOLUME ["$JBOSS_HOME/standalone", "$JBOSS_HOME/domain"]
VOLUME ["$JBOSS_HOME/standalone/configuration", "$JBOSS_HOME/domain/configuration"]
###################################
#### ---- ENV: Setup ---- ####
###################################
ENV PATH=$PATH:${JBOSS_HOME}/bin
###################################
#### -_- Deploy: node-info --- ####
###################################
#### ref: https://github.com/goldmann/wildfly-docker-deployment-example
ADD node-info.war /opt/jboss/wildfly/standalone/deployments/
###################################
#### ---- Deploy: Teiid ---- ####
###################################
WORKDIR ${JBOSS_HOME}
#### CMD ["/opt/jboss/wildfly/bin/standalone.sh", "-b", "0.0.0.0", "-bmanagement", "0.0.0.0"]
CMD ["/bin/sh", "-c", "${JBOSS_HOME}/bin/standalone.sh -c standalone-teiid.xml -b 0.0.0.0 -bmanagement 0.0.0.0"]