diff --git a/.github/workflows/lighty-rnc-app/simulator/Dockerfile b/.github/workflows/lighty-rnc-app/simulator/Dockerfile index bd24b84787..2833b13456 100644 --- a/.github/workflows/lighty-rnc-app/simulator/Dockerfile +++ b/.github/workflows/lighty-rnc-app/simulator/Dockerfile @@ -1,17 +1,27 @@ FROM alpine:3.18.3 as clone + +ARG SIMULATOR_VERSION=17.3.0 +RUN echo MY_VAR value is $SIMULATOR_VERSION + RUN apk add git WORKDIR /netconf-simulator -RUN git clone https://github.com/PANTHEONtech/lighty-netconf-simulator.git -b 17.3.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 COPY --from=clone /netconf-simulator/lighty-netconf-simulator /lighty-netconf-simulator RUN mvn -B install -DskipTests +ARG SIMULATOR_VERSION +ENV version=$SIMULATOR_VERSION +RUN echo MY_VAR value is $version FROM eclipse-temurin:17-jre-alpine WORKDIR /lighty-netconf-simulator COPY --from=build /lighty-netconf-simulator/examples/devices/lighty-network-topology-device/target/ /lighty-netconf-simulator/target EXPOSE 17380 +ARG SIMULATOR_VERSION +ENV version=$SIMULATOR_VERSION +RUN echo MY_VAR value is $SIMULATOR_VERSION -ENTRYPOINT ["java", "-jar", "/lighty-netconf-simulator/target/lighty-network-topology-device-17.3.0.jar"] +CMD ["java", "-jar", "/lighty-netconf-simulator/target/lighty-network-topology-device-$SIMULATOR_VERSION.jar"]