-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (34 loc) · 1.21 KB
/
Dockerfile
File metadata and controls
36 lines (34 loc) · 1.21 KB
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
FROM amazoncorretto:25
ARG JAR_FILE=target/eris-*.jar
COPY ${JAR_FILE} /app.jar
ENV OPENWEATHERMAP_API_KEY=openweatherapikey
ENV SEGMENTIO_WRITE_API_KEY=segmentioapikey
ENV ACTUATOR_USERNAME=username
ENV ACTUATOR_PASSWORD=password
ENV SPRING_CLOUD_CONSUL_ENABLED=false
ENV SPRING_CLOUD_CONSUL_HOST=localhost
ENV SPRING_CLOUD_CONSUL_PORT=8500
EXPOSE 8080
ENTRYPOINT ["java","-jar","/app.jar"]
# Since not building with mvn spring boot docker and using buildx for multiple architecture
# have to use a simpler Docker file
# FROM amazoncorretto:25 as builder
# ARG JAR_FILE=target/*.jar
# COPY ${JAR_FILE} application.jar
# RUN java -Djarmode=layertools -jar application.jar extract
#
# FROM amazoncorretto:25
# COPY --from=builder dependencies/ ./
# COPY --from=builder snapshot-dependencies/ ./
# COPY --from=builder spring-boot-loader/ ./
# COPY --from=builder application/ ./
#
# ENV OPENWEATHERMAP_API_KEY=openweatherapikey
# ENV SEGMENTIO_WRITE_API_KEY=segmentioapikey
# ENV ACTUATOR_USERNAME=username
# ENV ACTUATOR_PASSWORD=password
# ENV SPRING_CLOUD_CONSUL_ENABLED=false
# ENV SPRING_CLOUD_CONSUL_HOST=localhost
# ENV SPRING_CLOUD_CONSUL_PORT=8500
#
# ENTRYPOINT ["java", "org.springframework.boot.loader.launch.JarLauncher"]