From 795a5440d736a371dc00d2a815fdd796f27bf692 Mon Sep 17 00:00:00 2001 From: "tobias.pobocik" Date: Tue, 17 Oct 2023 11:26:06 +0200 Subject: [PATCH] Introduce variable to store simulator version Introduce an ARG (argument) in the Dockerfile to store the simulator version as a variable. The default version is set to "18.2.0," and it can be customized during the image build process using the --build-arg flag. JIRA:LIGHTY-260 Signed-off-by: tobias.pobocik --- .github/workflows/lighty-rnc-app/simulator/Dockerfile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lighty-rnc-app/simulator/Dockerfile b/.github/workflows/lighty-rnc-app/simulator/Dockerfile index 8734f08023..70e7d5c268 100644 --- a/.github/workflows/lighty-rnc-app/simulator/Dockerfile +++ b/.github/workflows/lighty-rnc-app/simulator/Dockerfile @@ -1,7 +1,10 @@ FROM alpine:3.18.3 as clone + +ARG SIMULATOR_VERSION=18.2.0 + RUN apk add git WORKDIR /netconf-simulator -RUN git clone https://github.com/PANTHEONtech/lighty-netconf-simulator.git -b 18.2.0 +RUN git clone https://github.com/PANTHEONtech/lighty-netconf-simulator.git -b $SIMULATOR_VERSION FROM maven:3.8-eclipse-temurin-17-alpine as build WORKDIR /lighty-netconf-simulator @@ -14,4 +17,4 @@ COPY --from=build /lighty-netconf-simulator/examples/devices/lighty-network-topo EXPOSE 17380 -ENTRYPOINT ["java", "-jar", "/lighty-netconf-simulator/target/lighty-network-topology-device-18.2.0.jar"] +ENTRYPOINT ["java", "-jar", "/lighty-netconf-simulator/target/lighty-network-topology-device-$SIMULATOR_VERSION.jar"]