Merge pull request #61 from jafarijason/for-pr

PR for proof of concept
This commit is contained in:
Pavel Zloi 2025-02-28 13:45:53 +03:00 committed by GitHub
commit ceb354a293
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 17 additions and 6 deletions

2
.github/FUNDING.yml vendored
View file

@ -1,3 +1,3 @@
# These are supported funding model platforms
custom: [https://pay.cloudtips.ru/p/937f48ac, https://boosty.to/evilfreelancer]
custom: [https://pay.cloudtips.ru/p/937f48ac, https://boosty.to/evilfreelancer]

1
.gitignore vendored
View file

@ -1,3 +1,4 @@
/.idea/
/*.vdi
/docker-compose.yml
build.txt

View file

@ -9,6 +9,8 @@ EXPOSE 1194 1701 1723 1812/udp 1813/udp 21 22 23 443 4500/udp 50 500/udp 51 2021
# Change work dir (it will also create this folder if is not exist)
WORKDIR /routeros
RUN mkdir -p /routeros_source
# Install dependencies
RUN set -xe \
&& apk add --no-cache --update \
@ -23,11 +25,11 @@ ENV ROUTEROS_IMAGE="chr-${ROUTEROS_VERSION}.vdi"
ENV ROUTEROS_PATH="https://cdn.mikrotik.com/routeros/${ROUTEROS_VERSION}/${ROUTEROS_IMAGE}.zip"
# Download VDI image from remote site
RUN wget "$ROUTEROS_PATH" -O "/routeros/${ROUTEROS_IMAGE}.zip" && \
unzip "/routeros/${ROUTEROS_IMAGE}.zip" -d "/routeros" && \
rm -f "/routeros/${ROUTEROS_IMAGE}.zip"
RUN wget "$ROUTEROS_PATH" -O "/routeros_source/${ROUTEROS_IMAGE}.zip" && \
unzip "/routeros_source/${ROUTEROS_IMAGE}.zip" -d "/routeros_source" && \
rm -f "/routeros_source/${ROUTEROS_IMAGE}.zip"
# Copy script to routeros folder
ADD ["./scripts", "/routeros"]
ADD ["./scripts", "/routeros_source"]
ENTRYPOINT ["/routeros/entrypoint.sh"]
ENTRYPOINT ["/routeros_source/entrypoint.sh"]

View file

@ -1,5 +1,13 @@
#!/usr/bin/env bash
if [[ ! -e "/routeros/generate-dhcpd-conf.py" ]]; then
cp -r /routeros_source/. /routeros
fi
cd /routeros
QEMU_BRIDGE_ETH1='qemubr1'
default_dev1='eth0'