EvilFreelancer.docker-routeros/Dockerfile

36 lines
1.1 KiB
Text
Raw Normal View History

FROM alpine:3.22.0
2018-08-22 15:55:57 +03:00
2020-04-14 21:20:11 +03:00
# For access via VNC
EXPOSE 5900
2020-08-24 15:58:15 -05:00
# Expose Ports of RouterOS
EXPOSE 1194 1701 1723 1812/udp 1813/udp 21 22 23 443 4500/udp 50 500/udp 51 2021 2022 2023 2027 5900 80 8080 8291 8728 8729 8900
2018-08-22 15:55:57 +03:00
2020-04-14 21:20:11 +03:00
# Change work dir (it will also create this folder if is not exist)
2018-08-22 15:55:57 +03:00
WORKDIR /routeros
2025-02-03 18:49:25 -05:00
RUN mkdir -p /routeros_source
2020-04-14 21:20:11 +03:00
# Install dependencies
RUN set -xe \
2024-02-04 15:06:03 -07:00
&& apk add --no-cache --update \
2020-04-14 21:20:11 +03:00
netcat-openbsd qemu-x86_64 qemu-system-x86_64 \
busybox-extras iproute2 iputils \
bridge-utils iptables jq bash python3
2018-08-22 15:55:57 +03:00
2020-04-14 21:20:11 +03:00
# Environments which may be change
2025-01-27 00:23:47 +03:00
ARG ROUTEROS_VERSION
ENV ROUTEROS_VERSION=${ROUTEROS_VERSION}
2024-02-03 21:32:13 -07:00
ENV ROUTEROS_IMAGE="chr-${ROUTEROS_VERSION}.vdi"
ENV ROUTEROS_PATH="https://cdn.mikrotik.com/routeros/${ROUTEROS_VERSION}/${ROUTEROS_IMAGE}.zip"
2018-08-22 15:55:57 +03:00
2020-04-14 21:20:11 +03:00
# Download VDI image from remote site
2025-02-03 18:49:25 -05:00
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"
2020-04-14 21:20:11 +03:00
# Copy script to routeros folder
2025-02-03 18:49:25 -05:00
ADD ["./scripts", "/routeros_source"]
2025-02-03 19:10:28 -05:00
ENTRYPOINT ["/routeros_source/entrypoint.sh"]