-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
48 lines (36 loc) · 1.24 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
# Generated by IBM TransformationAdvisor
# Mon Aug 24 12:31:22 UTC 2020
FROM adoptopenjdk/openjdk8-openj9 AS build-stage
RUN apt-get update && \
apt-get install -y maven unzip
COPY . /project
WORKDIR /project
#RUN mvn -X initialize process-resources verify => to get dependencies from maven
#RUN mvn clean package
#RUN mvn --version
RUN mvn clean package
RUN mkdir -p /config/apps && \
mkdir -p /sharedlibs && \
cp ./src/main/liberty/config/server.xml /config && \
cp ./target/*.*ar /config/apps/ && \
if [ ! -z "$(ls ./src/main/liberty/lib)" ]; then \
cp ./src/main/liberty/lib/* /sharedlibs; \
fi
FROM ibmcom/websphere-liberty:kernel-java8-ibmjava-ubi
ARG SSL=true
ARG MP_MONITORING=true
ARG HTTP_ENDPOINT=false
RUN mkdir -p /opt/ibm/wlp/usr/shared/config/lib/global
COPY --chown=1001:0 --from=build-stage /config/ /config/
COPY --chown=1001:0 --from=build-stage /sharedlibs/ /opt/ibm/wlp/usr/shared/config/lib/global
USER root
RUN configure.sh
USER 1001
# Upgrade to production license if URL to JAR provided
ARG LICENSE_JAR_URL
RUN \
if [ $LICENSE_JAR_URL ]; then \
wget $LICENSE_JAR_URL -O /tmp/license.jar \
&& java -jar /tmp/license.jar -acceptLicense /opt/ibm \
&& rm /tmp/license.jar; \
fi