Skip to content

Commit

Permalink
Introduce variable to store simulator version
Browse files Browse the repository at this point in the history
Introduce an ARG (argument) in the Dockerfile to store the simulator version as
a variable. The default version is set to "17.3.0," and it can be customized during
the image build process using the --build-arg flag.

JIRA:LIGHTY-260
Signed-off-by: tobias.pobocik <[email protected]>
  • Loading branch information
Tobianas committed Oct 18, 2023
1 parent 95042ce commit b15640e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/lighty-rnc-app/simulator/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
FROM alpine:3.18.3 as clone

ARG SIMULATOR_VERSION=17.3.0
ENV SIMULATOR_VERSION1=$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_VERSION1

FROM maven:3.8-eclipse-temurin-17-alpine as build
WORKDIR /lighty-netconf-simulator
Expand All @@ -14,4 +18,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-17.3.0.jar"]
CMD ["java", "-jar", "/lighty-netconf-simulator/target/lighty-network-topology-device-$SIMULATOR_VERSION1.jar"]

0 comments on commit b15640e

Please sign in to comment.