-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathDockerfile.weblogic.update
67 lines (56 loc) · 2.03 KB
/
Dockerfile.weblogic.update
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
#Copyright (c) 2018, 2019 Oracle and/or its affiliates. All rights reserved.
#
#Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
#
#
# HOW TO BUILD THIS IMAGE
# -----------------------
# Run:
# $ sudo docker build --no-cache \
# --build-arg WEBAPP_LOCATION=path to war
# --build-arg WEBAPP_WAR=war file name
# --build-arg SOURCEIMAGE=tag of image to update
# --build-arg WLS_ADMINUSER=
# --build-arg WLS_ADMINPASSWORD=
# --force-rm=true \
# -t 12213-domain-home-in-image-wdt .
#
#
# Pull image
# ---------------
ARG SOURCEIMAGE
FROM ${SOURCEIMAGE}
ARG WEBAPP_LOCATION
ARG WEBAPP_WAR
ARG WLS_ADMINUSER
ARG WLS_ADMINPASSWORD
ENV ADMIN_USER=$WLS_ADMINUSER \
ADMIN_PASSWORD=$WLS_ADMINPASSWORD \
WEBAPP_WARFILE=$WEBAPP_WAR \
APP_PKG_FILE=$WEBAPP_LOCATION/$WEBAPP_WAR
COPY ${APP_PKG_FILE} ${SCRIPT_HOME}
RUN ls -la ${SCRIPT_HOME}
COPY ${APP_PKG_FILE} ${DOMAIN_HOME}/sample-domain1/wlsdeploy/applications/
RUN ls -la ${DOMAIN_HOME}/sample-domain1/wlsdeploy/applications/
COPY container-scripts/appdeploy.py ${SCRIPT_HOME}
COPY container-scripts/updateApp.sh ${SCRIPT_HOME}
COPY docker/*.properties ${PROPERTIES_FILE_DIR}/
USER root
RUN chmod +xw ${SCRIPT_HOME}/*.sh && \
chown oracle:oracle ${SCRIPT_HOME}/${WEBAPP_WARFILE} && \
chown oracle:oracle ${DOMAIN_HOME}/sample-domain1/wlsdeploy/applications/${WEBAPP_WARFILE} && \
chown -R oracle:oracle ${PROPERTIES_FILE_DIR}
ENV APP_PKG_FILE=${SCRIPT_HOME}/${WEBAPP_WARFILE} \
APP_NAME="creditscore" \
CLUSTER_NAME="cluster-1"
USER oracle
RUN . ${ORACLE_HOME}/wlserver/server/bin/setWLSEnv.sh && \
${SCRIPT_HOME}/updateApp.sh
# Mount the domain home and the WDT home for easy access.
VOLUME $DOMAIN_HOME
VOLUME $WDT_HOME
# Expose admin server, managed server port and domain debug port
EXPOSE $ADMIN_PORT $MANAGED_SERVER_PORT $DEBUG_PORT
WORKDIR $DOMAIN_HOME
# Define default command to start Admin Server in a container.
CMD ["/u01/oracle/startAdminServer.sh"]