From e1ae31eb1aa3450fd1657c5138b09ba13a510036 Mon Sep 17 00:00:00 2001 From: Alexei Vinogradov Date: Tue, 11 Jan 2022 12:32:44 +0100 Subject: [PATCH] parametrized Dockerfile and update dev readme. --- Dockerfile | 5 +++-- README_DEVELOPER.md | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 74270b5..13e4927 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,8 @@ FROM openjdk:11-jre-slim MAINTAINER Alexei Vinogradov +ARG BROKER_VERSION WORKDIR /opt/test-data-broker -COPY build/libs/test-data-broker-0.2.0.jar . +COPY build/libs/test-data-broker-$BROKER_VERSION.jar . EXPOSE 8080 -ENTRYPOINT ["java", "-jar", "test-data-broker-0.2.0.jar"] +ENTRYPOINT ["java", "-jar", "test-data-broker-$BROKER_VERSION.jar"] diff --git a/README_DEVELOPER.md b/README_DEVELOPER.md index 121ef14..acea867 100644 --- a/README_DEVELOPER.md +++ b/README_DEVELOPER.md @@ -7,5 +7,7 @@ Security & Signing settings must be in gradle.properties ## publish docker image for arm64 (mac m1) and amd64 architectures +You might need to create a new driver with eg. `docker buildx create --use` for the first execution. + 1. `docker login` -2. `docker buildx build --platform linux/amd64,linux/arm64 -t vinogradoff/test-data-broker:x.y.z -t vinogradoff/test-data-broker:latest . --push` \ No newline at end of file +2. `docker buildx build --build-arg BROKER_VERSION=x.y.z --platform linux/amd64,linux/arm64 -t vinogradoff/test-data-broker:x.y.z -t vinogradoff/test-data-broker:latest . --push` \ No newline at end of file