-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.chr-qemu
35 lines (26 loc) · 1.22 KB
/
Dockerfile.chr-qemu
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
FROM alpine:3.19.1
### Adapted from https://github.com/EvilFreelancer/docker-routeros/blob/master/Dockerfile
### Added support to get RouterOS version at build time as ARG
# Get RouterOS as argument for build
ARG ARG_ROUTEROS_VERSION="7.14.3"
# 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
# Change work dir (will create is not exist)
WORKDIR /routeros
# Install dependencies
RUN set -xe \
&& apk add --no-cache --update \
netcat-openbsd qemu-x86_64 qemu-system-x86_64 \
busybox-extras iproute2 iputils \
bridge-utils iptables jq bash python3
# Environments which may be change
ENV ROUTEROS_VERSION="${ARG_ROUTEROS_VERSION}"
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"
# Copy script to routeros folder
COPY --from=evilfreelancer/docker-routeros /routeros /routeros
ENTRYPOINT ["/routeros/entrypoint.sh"]