mirror of
https://github.com/EvilFreelancer/docker-routeros.git
synced 2025-08-28 13:48:14 +02:00
commit
ceb354a293
4 changed files with 17 additions and 6 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,3 +1,4 @@
|
||||||
/.idea/
|
/.idea/
|
||||||
/*.vdi
|
/*.vdi
|
||||||
/docker-compose.yml
|
/docker-compose.yml
|
||||||
|
build.txt
|
12
Dockerfile
12
Dockerfile
|
@ -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_source/entrypoint.sh"]
|
||||||
|
|
|
@ -1,5 +1,13 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
if [[ ! -e "/routeros/generate-dhcpd-conf.py" ]]; then
|
||||||
|
|
||||||
|
cp -r /routeros_source/. /routeros
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
cd /routeros
|
||||||
|
|
||||||
QEMU_BRIDGE_ETH1='qemubr1'
|
QEMU_BRIDGE_ETH1='qemubr1'
|
||||||
default_dev1='eth0'
|
default_dev1='eth0'
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue