spring-web-modules/Dockerfile
Sambo Chea 5efe14c78a
Some checks reported errors
continuous-integration/drone/push Build was killed
Fixed and remove git source from build
2023-03-09 18:55:00 +07:00

40 lines
807 B
Docker

# Builder
FROM bellsoft/liberica-openjdk-alpine-musl as builder
LABEL maintainer="sombochea@cubetiqs.com"
WORKDIR /app
COPY gradlew ./
COPY gradle ./gradle
RUN ./gradlew
COPY settings.gradle.kts ./
COPY build.gradle.kts ./
COPY api/build.gradle.kts ./api/build.gradle.kts
COPY api/src ./api/src
RUN ./gradlew api:bootJar
# Build for container image
FROM bellsoft/liberica-openjre-alpine-musl
LABEL maintainer="sombochea@cubetiqs.com"
# App root path
WORKDIR /opt/cubetiq
# App volumn
VOLUME ["/opt/cubetiq", "/data"]
# Api Module Build Directory
ARG API_BUILD_DIR=api/build
# Copy the app bundle to the workdir
COPY --from=builder /app/${API_BUILD_DIR}/libs/api.jar ./api.jar
# App profile will run with
ENV PROFILE=dev
ENV APP_DATA_DIR=/data
# Entrypoint to app
CMD ["java","-jar", "./api.jar"]