Skip to content
This repository has been archived by the owner on Aug 13, 2022. It is now read-only.

Commit

Permalink
#158 dockerfile 태그정보설정 (#168)
Browse files Browse the repository at this point in the history
* Build : PING 에 버전 추가하기 delivery-info-service

* Build : PING 에 버전 추가하기 delivery-relay-service

* Build : PING 에 버전 추가하기 Rider-Location-service
  • Loading branch information
JooHyukKim authored Jan 17, 2022
1 parent be61e37 commit fd5e148
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 9 deletions.
5 changes: 3 additions & 2 deletions delivery-info-service/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@ FROM openjdk:11.0.10-jre-slim-buster
# 빌드목적
ARG JAR_FILENAME='delivery-info-service.jar'
ARG PACKAGE_JAR_LOCATION=build/libs/${JAR_FILENAME}
ARG VERSION

# 실행목적
# docker run --e 로 오버라이딩
ENV COMMAND_LINE_ARGS_BEFORE=${COMMAND_LINE_ARGS_BEFORE}
ENV COMMAND_LINE_ARGS_AFTER=${COMMAND_LINE_ARGS_AFTER}
ENV SERVER_PORT=8888
ENV VERSION=${VERSION}

ADD ${PACKAGE_JAR_LOCATION} app.jar

EXPOSE ${SERVER_PORT}:8888
ENTRYPOINT java ${COMMAND_LINE_ARGS_BEFORE} -jar ./app.jar ${COMMAND_LINE_ARGS_AFTER}

ENTRYPOINT java ${COMMAND_LINE_ARGS_BEFORE} ${VERSION} -jar ./app.jar ${COMMAND_LINE_ARGS_AFTER}
5 changes: 4 additions & 1 deletion delivery-info-service/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,8 @@ spring:
profiles:
active: production

docker:
image:
version: -1
hello:
world: "Hello World! (Delivery-Info-Service)"
world: Hello World! - delivery-info-service/${docker.image.version}
5 changes: 3 additions & 2 deletions delivery-relay-service/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@ FROM openjdk:11.0.10-jre-slim-buster
# 빌드목적
ARG JAR_FILENAME='delivery-relay-service.jar'
ARG PACKAGE_JAR_LOCATION=build/libs/${JAR_FILENAME}
ARG VERSION

# 실행목적
# docker run --e 로 오버라이딩
ENV COMMAND_LINE_ARGS_BEFORE=${COMMAND_LINE_ARGS_BEFORE}
ENV COMMAND_LINE_ARGS_AFTER=${COMMAND_LINE_ARGS_AFTER}
ENV SERVER_PORT=8888
ENV VERSION=${VERSION}

ADD ${PACKAGE_JAR_LOCATION} app.jar

EXPOSE ${SERVER_PORT}:8888
ENTRYPOINT java ${COMMAND_LINE_ARGS_BEFORE} -jar ./app.jar ${COMMAND_LINE_ARGS_AFTER}

ENTRYPOINT java ${COMMAND_LINE_ARGS_BEFORE} ${VERSION} -jar ./app.jar ${COMMAND_LINE_ARGS_AFTER}
6 changes: 5 additions & 1 deletion delivery-relay-service/src/main/resources/application.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
docker:
image:
version: -1

hello:
world: "Hello World! (Delivery-Relay-Service)"
world: Hello World! from Delivery-Relay-Service v.${docker.image.version}
5 changes: 3 additions & 2 deletions rider-location-service/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@ FROM openjdk:11.0.10-jre-slim-buster
# 빌드목적
ARG JAR_FILENAME='rider-location-service.jar'
ARG PACKAGE_JAR_LOCATION=build/libs/${JAR_FILENAME}
ARG VERSION

# 실행목적
# docker run --e 로 오버라이딩
ENV COMMAND_LINE_ARGS_BEFORE=${COMMAND_LINE_ARGS_BEFORE}
ENV COMMAND_LINE_ARGS_AFTER=${COMMAND_LINE_ARGS_AFTER}
ENV SERVER_PORT=8888
ENV VERSION=${VERSION}

ADD ${PACKAGE_JAR_LOCATION} app.jar

EXPOSE ${SERVER_PORT}:8888
ENTRYPOINT java ${COMMAND_LINE_ARGS_BEFORE} -jar ./app.jar ${COMMAND_LINE_ARGS_AFTER}

ENTRYPOINT java ${COMMAND_LINE_ARGS_BEFORE} ${VERSION} -jar ./app.jar ${COMMAND_LINE_ARGS_AFTER}
6 changes: 5 additions & 1 deletion rider-location-service/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,9 @@ services:
deliveryInfoService:
path: http://localhost:${wiremock.server.port}

docker:
image:
version: -1

hello:
world: "Hello World! (Rider-Location-Service)"
world: Hello World! from Rider-Location-Service v.${docker.image.version}

0 comments on commit fd5e148

Please sign in to comment.