-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
50 lines (35 loc) · 1.37 KB
/
Dockerfile
File metadata and controls
50 lines (35 loc) · 1.37 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
# Generated by IBM TransformationAdvisor
# Wed Mar 10 14:16:07 UTC 2021
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 --version
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 TLS=true
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
# Add interim fixes (optional)
# COPY --chown=1001:0 interim-fixes /opt/ol/fixes/
# This script will add the requested server configurations, apply any interim fixes and populate caches to optimize runtime
RUN configure.sh
# 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