-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathDockerfile
30 lines (22 loc) · 994 Bytes
/
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
# Stage 1: Build with maven to produce the .war application
FROM icr.io/appcafe/open-liberty-devfile-stack:21.0.0.12 as build
USER root
COPY src /src
COPY pom.xml /
RUN mvn -B package
USER 1001
# Stage 2: Place application on a liberty server
# TODO: Invest in using a kernel build and use the feature manager to install
# needed Liberty features
FROM icr.io/appcafe/open-liberty:24.0.0.11-kernel-slim-java8-openj9-ubi
ARG VERSION=1.0
ARG REVISION=SNAPSHOT
COPY --chown=1001:0 server.xml /config/
# 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
COPY --from=build --chown=1001:0 /target/openliberty-starter-1.0-SNAPSHOT.war /config/apps/
# This script will add the requested server configurations, apply any interim fixes and populate caches to
# optimize runtime
RUN configure.sh