spring-web-modules-kubernet.../Dockerfile

26 lines
570 B
Docker
Raw Normal View History

2021-12-21 11:55:35 +07:00
FROM cubetiq/openjdk:11u-ubuntu as builder
LABEL maintainer="sombochea@cubetiqs.com"
WORKDIR /app
RUN apt-get update && apt-get install -y git
COPY . .
RUN sh gradlew clean bootJar
2021-12-20 17:26:07 +07:00
FROM cubetiq/calpine-openjdk11:latest
LABEL maintainer="sombochea@cubetiqs.com"
# Working directory for application
WORKDIR /opt/cubetiq
# Define mount volumn for data path
VOLUME ["/opt/cubetiq/data"]
# Copy build source to container
2021-12-21 11:55:35 +07:00
COPY --from=builder /app/api/build/libs/*.jar ./api.jar
2021-12-20 17:26:07 +07:00
ENV APP_DATA_DIR "/opt/cubetiq/data"
# Entrypoint to app
CMD ["java","-jar", "./api.jar"]