-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.native
More file actions
30 lines (29 loc) · 1.09 KB
/
Dockerfile.native
File metadata and controls
30 lines (29 loc) · 1.09 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
FROM alokkusingh/graalvm-ce:23.1.2-java21-arm64 AS builder
ARG JAR_FILE
# Note: native-image is already in above base image (above)
#RUN gu install native-image
COPY src /home/app/src
COPY pom.xml /home/app
COPY native /home/app/native
COPY settings.xml $M2_HOME/conf/settings.xml
WORKDIR /home/app
RUN ls /home/app
RUN cat $M2_HOME/conf/settings.xml
RUN echo $M2_HOME
RUN mvn clean package -Pnative
FROM arm64v8/ubuntu:focal
MAINTAINER Alok Singh (alok.ku.singh@gmail.com)
RUN groupadd -g 600 singh && useradd -u 601 -g 600 alok
RUN mkdir -p /opt/logs
RUN mkdir -p /home/alok
COPY src/main/resources/keystore.jks /home/alok/keystore.jks
COPY src/main/resources/truststore.jks /home/alok/trustore.jks
COPY --from=builder /home/app/target/home-api-service /opt/home-api-service
RUN chown -R alok /opt
RUN chown -R alok /home/alok
USER alok
EXPOSE 8081
WORKDIR /opt
# Removed sprint porfiles from here, isnted it will be set using configMap in Kueberenetes
#ENTRYPOINT ["java","-Djava.security.egd=file:/dev/urandom","-Dspring.profiles.active=prod,mqtt","-jar","/opt/app.jar"]
ENTRYPOINT ["/opt/home-api-service"]