-
Notifications
You must be signed in to change notification settings - Fork 0
/
DockerfileSpace
43 lines (28 loc) · 1.2 KB
/
DockerfileSpace
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
FROM maven:3-eclipse-temurin-8 as builder
WORKDIR /sources
COPY ./ /sources
# store maven dependencies so next build doesn't have to download them again
RUN mvn -B dependency:go-offline
RUN mvn -B package -DskipTests
RUN mkdir /application && \
cp target/*.jar /application/icat.jar
WORKDIR /application
# Extract spring boot JAR layers
RUN java -Djarmode=layertools -jar icat.jar extract
FROM eclipse-temurin:8-jre as finalImage
LABEL maintainer="GeoCat B.V."
# Check the file application.properties for a description of the environment variables that can be customized.
# The property names can be translated to environment varibles passing them to upper case and replacing the dots
# with underscores. For example harvester.jdbc.url -> HARVESTER_JDBC_URL
COPY extra/certs/ /certs
COPY extra/bin /usr/local/bin
RUN chmod -R +x /usr/local/bin && \
import_certs.sh && \
mkdir -p mkdir -p /opt/icat
WORKDIR /opt/icat
COPY --from=builder /application/dependencies/ ./
COPY --from=builder /application/spring-boot-loader ./
COPY --from=builder /application/snapshot-dependencies/ ./
COPY --from=builder /application/application/ ./
EXPOSE 9999
CMD [ "java", "org.springframework.boot.loader.JarLauncher" ]