forked from ibm-cloud-architecture/cloudnative_sample_app
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
18 lines (14 loc) · 747 Bytes
/
Dockerfile
File metadata and controls
18 lines (14 loc) · 747 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
FROM openliberty/open-liberty:springBoot2-ubi-min as staging
USER root
COPY target/cloudnativesampleapp-1.0-SNAPSHOT.jar /staging/fatClinic.jar
RUN springBootUtility thin \
--sourceAppPath=/staging/fatClinic.jar \
--targetThinAppPath=/staging/thinClinic.jar \
--targetLibCachePath=/staging/lib.index.cache
FROM openliberty/open-liberty:springBoot2-ubi-min
USER root
COPY --from=staging /staging/lib.index.cache /opt/ol/wlp/usr/shared/resources/lib.index.cache
COPY --from=staging /staging/thinClinic.jar /config/dropins/spring/thinClinic.jar
RUN chown -R 1001.0 /config && chmod -R g+rw /config
RUN chown -R 1001.0 /opt/ol/wlp/usr/shared/resources/lib.index.cache && chmod -R g+rw /opt/ol/wlp/usr/shared/resources/lib.index.cache
USER 1001