From 73f4ee47cb12a0fb74b73349254991f28c66e05e Mon Sep 17 00:00:00 2001 From: Merith Date: Thu, 5 Jun 2025 06:07:01 +0000 Subject: [PATCH] winbox download --- Dockerfile | 2 +- entrypoint.sh | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5f1c5ac..fb1911f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ FROM git.merith.xyz/gns3/base-vnc:latest ## START setting your image here -# RUN apk add --no-cache firefox-esr +RUN apk add --no-cache wine ## STOP setting up your image here # DO NOT REMOVE AND DO NOT ADD AN "ENTRYPOINT" COMMAND diff --git a/entrypoint.sh b/entrypoint.sh index e4891f6..e8ea64b 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,3 +1,17 @@ #!/bin/bash -xterm \ No newline at end of file +# Wait until internet is available +while ! ping -c1 1.1.1.1 &>/dev/null; do + echo "Waiting for internet connection..." + sleep 5 +done + +if [ ! -f "/data/winbox64.exe" ]; then + echo "Winbox executable not found in /data. Downloading..." + mkdir -p /data + wget -O /data/winbox64.exe https://download.mikrotik.com/routeros/winbox/3.42/winbox64.exe +else + echo "Winbox executable found in /data." +fi + +wine64 /tmp/winbox64.exe