api-gateway/Dockerfile

30 lines
834 B
Docker
Raw Permalink Normal View History

2022-11-11 05:05:26 +01:00
FROM amazoncorretto:17-alpine3.16 as builder
LABEL author="Piotr Biernat"
2022-10-12 17:51:29 +02:00
LABEL service="api-gw"
LABEL vendor="Egommerce"
LABEL version="1.0"
RUN mkdir /app
WORKDIR /app
2022-11-11 05:05:26 +01:00
COPY apigw .
RUN ./mvnw clean compile install
2022-11-11 05:05:26 +01:00
FROM amazoncorretto:17-alpine3.16
2022-11-11 05:05:26 +01:00
#ENV CA_CERT_DIR /usr/lib/jvm/java-8-amazon-corretto/lib/security
COPY --from=builder /app/target/apigw-dev-jar-with-dependencies.jar /api-gw.jar
# Add own ca to cacert trusted db
#COPY --from=builder /app/src/main/resources/ca.pem /tmp/ca.pem
#RUN keytool -import -trustcacerts -keystore ${CA_CERT_DIR}/cacerts \
# -storepass changeit -noprompt -alias mycert -file /tmp/ca.pem && \
# rm /tmp/ca.pem
# "-Djavax.net.debug=all",
ENTRYPOINT ["java", "-Xmx1g", "-Djava.security.egd=file:/dev/./urandom", "-jar", "/api-gw.jar", "--spring.profiles.active=docker"]
EXPOSE 443