forked from SomeDemos/modresorts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Containerfile
52 lines (36 loc) · 1.62 KB
/
Containerfile
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
# Generated by IBM TransformationAdvisor
# Tue May 21 12:00:11 UTC 2024
FROM icr.io/appcafe/ibm-semeru-runtimes:open-8-jdk-focal 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 mkdir -p /config/apps && \
mkdir -p /sharedlibs && \
cp ./src/main/liberty/config/* /config && \
cp ./target/*.*ar /config/apps/ && \
if [ ! -z "$(ls ./src/main/liberty/lib 2>/dev/null)" ]; then \
cp -r ./src/main/liberty/lib/* /sharedlibs; \
fi
FROM icr.io/appcafe/websphere-liberty:kernel-java8-openj9-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
# This script will add the requested XML snippets to enable Liberty features and grow image to be fit-for-purpose using featureUtility.
# Only available in 'kernel-slim'. The 'full' tag already includes all features for convenience.
RUN features.sh
# 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