forked from IBM/template-java-spring
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
31 lines (20 loc) · 797 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
FROM quay.io/ibmgaragecloud/gradle:jdk11 AS builder
WORKDIR /home/gradle
COPY . .
RUN ./gradlew assemble copyJarToServerJar --no-daemon
FROM registry.access.redhat.com/ubi8/openjdk-11:1.3-15
USER root
## Uncomment the below line to update image security content if any
# RUN dnf -y update-minimal --security --sec-severity=Important --sec-severity=Critical && dnf clean all
COPY ./licenses /licenses
USER 1001
LABEL name="ibm/template-java-spring" \
vendor="IBM" \
version="1.3" \
release="15" \
summary="This is an example of a container image." \
description="This container image will deploy a Java Spring App"
# hadolint ignore=DL3045
COPY --from=builder /home/gradle/build/libs/server.jar server.jar
EXPOSE 9080/tcp
CMD ["java", "-jar", "server.jar"]