This commit is contained in:
Jason Jafari 2025-02-03 18:49:25 -05:00
parent 63c948b6e1
commit 6face9e8b5
6 changed files with 18 additions and 12 deletions

3
.github/FUNDING.yml vendored
View file

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

View file

@ -35,7 +35,7 @@ jobs:
- name: Get Docker Hub tags - name: Get Docker Hub tags
id: docker_hub_tags id: docker_hub_tags
run: | run: |
OWNER="evilfreelancer" OWNER="jafarijason"
REPO="docker-routeros" REPO="docker-routeros"
URL="https://registry.hub.docker.com/v2/repositories/${OWNER}/${REPO}/tags/" URL="https://registry.hub.docker.com/v2/repositories/${OWNER}/${REPO}/tags/"
TAGS=$(curl -s "$URL" | jq -r '.results[].name' | grep -v "latest") TAGS=$(curl -s "$URL" | jq -r '.results[].name' | grep -v "latest")
@ -51,7 +51,7 @@ jobs:
if: ${{ !contains(steps.docker_hub_tags.outputs.tags, steps.get_routeros_version.outputs.version) }} if: ${{ !contains(steps.docker_hub_tags.outputs.tags, steps.get_routeros_version.outputs.version) }}
run: | run: |
VERSION="${{ steps.get_routeros_version.outputs.version }}" VERSION="${{ steps.get_routeros_version.outputs.version }}"
OWNER="evilfreelancer" OWNER="jafarijason"
REPO="docker-routeros" REPO="docker-routeros"
# Set up Docker Buildx # Set up Docker Buildx

1
.gitignore vendored
View file

@ -1,3 +1,4 @@
/.idea/ /.idea/
/*.vdi /*.vdi
/docker-compose.yml /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) # Change work dir (it will also create this folder if is not exist)
WORKDIR /routeros WORKDIR /routeros
RUN mkdir -p /routeros_source
# Install dependencies # Install dependencies
RUN set -xe \ RUN set -xe \
&& apk add --no-cache --update \ && 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" ENV ROUTEROS_PATH="https://cdn.mikrotik.com/routeros/${ROUTEROS_VERSION}/${ROUTEROS_IMAGE}.zip"
# Download VDI image from remote site # Download VDI image from remote site
RUN wget "$ROUTEROS_PATH" -O "/routeros/${ROUTEROS_IMAGE}.zip" && \ RUN wget "$ROUTEROS_PATH" -O "/routeros_source/${ROUTEROS_IMAGE}.zip" && \
unzip "/routeros/${ROUTEROS_IMAGE}.zip" -d "/routeros" && \ unzip "/routeros_source/${ROUTEROS_IMAGE}.zip" -d "/routeros_source" && \
rm -f "/routeros/${ROUTEROS_IMAGE}.zip" rm -f "/routeros_source/${ROUTEROS_IMAGE}.zip"
# Copy script to routeros folder # Copy script to routeros folder
ADD ["./scripts", "/routeros"] ADD ["./scripts", "/routeros_source"]
ENTRYPOINT ["/routeros/entrypoint.sh"] ENTRYPOINT ["/routeros/entrypoint.sh"]

View file

@ -2,7 +2,7 @@ version: "3"
services: services:
routeros-6-48: routeros-6-48:
image: evilfreelancer/docker-routeros:6.48.4 image: jafarijason/docker-routeros:6.48.4
restart: unless-stopped restart: unless-stopped
cap_add: cap_add:
- NET_ADMIN - NET_ADMIN
@ -16,7 +16,7 @@ services:
- "18729:8729" - "18729:8729"
routeros-latest: routeros-latest:
image: evilfreelancer/docker-routeros:latest image: jafarijason/docker-routeros:latest
restart: unless-stopped restart: unless-stopped
cap_add: cap_add:
- NET_ADMIN - NET_ADMIN
@ -33,7 +33,7 @@ services:
- "28729:8729" - "28729:8729"
routeros-local: routeros-local:
image: evilfreelancer/docker-routeros:latest image: jafarijason/docker-routeros:latest
build: build:
context: . context: .
dockerfile: Dockerfile dockerfile: Dockerfile

View file

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