forked from wgu-opensource/osmt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
28 lines (20 loc) · 813 Bytes
/
Dockerfile
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
###########################
## TEMPORARY BUILD IMAGE ##
###########################
FROM wguopensource/osmt-build:latest as build
# Copy in source code.
USER ${USER}
COPY --chown=${USER}:${USER} ./ ${BASE_DIR}/build/
WORKDIR ${BASE_DIR}/build
# The dockerfile-build Maven profile excludes certain api integration tests that require access to the Docker service.
RUN mvn clean install -P dockerfile-build
######################
## SPRING APP IMAGE ##
######################
FROM wguopensource/osmt-base:latest
ARG MVN_POM_VERSION
COPY --chown=${USER}:${USER} ./import ${BASE_DIR}/import/
COPY --from=build --chown=${USER}:${USER} ${BASE_DIR}/build/api/target/osmt-api-${MVN_POM_VERSION}.jar ${BASE_DIR}/bin/osmt.jar
ADD ./docker/ /${BASE_DIR}/
EXPOSE 8080
ENTRYPOINT ["/opt/osmt/bin/docker_entrypoint.sh"]