Skip to content
Snippets Groups Projects
Commit 7b7db86e authored by Neil-Jocelyn Schark's avatar Neil-Jocelyn Schark
Browse files

wip

parent f5e083e6
Branches
No related tags found
No related merge requests found
Pipeline #185914 failed
This commit is part of merge request !773. Comments created here will be created in the context of that merge request.
ARG GOLANG_VERSION=1.22
ARG BUILDARGS
ARG GITLAB_PROXY
#ARG GOLANG_VERSION=1.22
#ARG BUILDARGS
#ARG GITLAB_PROXY
#
#FROM ${GITLAB_PROXY}golang:$GOLANG_VERSION-bookworm as builder
#WORKDIR /gosdn/
#COPY . .
#RUN --mount=type=cache,target=/root/go/pkg/mod \
# --mount=type=cache,target=/root/.cache/go-build \
# make build-gosdn
#
#FROM ${GITLAB_PROXY}debian:bookworm-slim
#WORKDIR /app/
#RUN mkdir -p controller/configs/
#
#COPY --from=builder /gosdn/artifacts/gosdn ./gosdn
#
#COPY --from=builder /gosdn/controller/configs/development-gosdn.toml.example ./configs/development-gosdn.toml
#COPY --from=builder /gosdn/controller/configs/integration-test-gosdn.toml ./configs/integration-test-gosdn.toml
#COPY --from=builder /gosdn/controller/configs/containerlab-gosdn.toml.example ./configs/containerlab-gosdn.toml
#COPY --from=builder /gosdn/controller/configs/gNMISubscriptions.txt.example ./configs/gNMISubscriptions.txt
#
#COPY controller/start_controller_later.sh .
#RUN chmod +x start_controller_later.sh
#
#EXPOSE 55055 8080 40000
#ENTRYPOINT ["./gosdn"]
FROM ${GITLAB_PROXY}golang:$GOLANG_VERSION-bookworm as builder
WORKDIR /gosdn/
COPY . .
RUN --mount=type=cache,target=/root/go/pkg/mod \
--mount=type=cache,target=/root/.cache/go-build \
make build-gosdn
FROM debian:bookworm-slim
FROM ${GITLAB_PROXY}debian:bookworm-slim
WORKDIR /app/
RUN mkdir -p controller/configs/
RUN apt-get update && apt-get install -y curl bash wget nmap dnsutils
COPY --from=builder /gosdn/artifacts/gosdn ./gosdn
WORKDIR /app
COPY --from=builder /gosdn/controller/configs/development-gosdn.toml.example ./configs/development-gosdn.toml
COPY --from=builder /gosdn/controller/configs/integration-test-gosdn.toml ./configs/integration-test-gosdn.toml
COPY --from=builder /gosdn/controller/configs/containerlab-gosdn.toml.example ./configs/containerlab-gosdn.toml
COPY --from=builder /gosdn/controller/configs/gNMISubscriptions.txt.example ./configs/gNMISubscriptions.txt
COPY controller/start_controller_later.sh ./run.sh
RUN chmod +x run.sh
COPY controller/start_controller_later.sh .
RUN chmod +x start_controller_later.sh
EXPOSE 55055 8080 40000
ENTRYPOINT ["./gosdn"]
EXPOSE 1337
ENTRYPOINT [ "/app/run.sh" ]
#!/bin/sh
echo "Starting controller later"
#echo "Starting controller later"
#sleep 20
#echo "Starting controller now"
#./gosdn
#!/bin/bash
sleep 20
echo "Starting controller now"
./gosdn
#ls -la
echo ------------------------------------
nmap -p 5672 rabbitmq
echo ------------------------------------
nslookup rabbitmq
echo ------------------------------------
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment