├── winbox.sh ├── Dockerfile └── README /winbox.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -x 4 | 5 | mkdir -p $HOME/.docker-winbox 6 | 7 | CONTAINER=$(docker run -v $HOME/.docker-winbox:/home/winbox \ 8 | -d -p 127.0.0.1::22 zanardo/winbox) 9 | 10 | PORT=$(docker port $CONTAINER 22 | sed -e 's/^.*://') 11 | 12 | for x in $(seq 10); do 13 | sshpass -pwinbox ssh -X -p $PORT -o StrictHostKeyChecking=no \ 14 | -o UserKnownHostsFile=/dev/null \ 15 | winbox@127.0.0.1 wine /winbox.exe && break 16 | sleep 1 17 | done 18 | 19 | docker stop $CONTAINER 20 | docker rm -f $CONTAINER 21 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian:wheezy 2 | MAINTAINER zanardo@gmail.com 3 | 4 | RUN sed -i 's/http\.debian\.net/ftp.br.debian.org/g' /etc/apt/sources.list 5 | RUN dpkg --add-architecture i386 6 | RUN apt-get update 7 | RUN apt-get -y install wine-bin:i386 8 | RUN apt-get -y install wget 9 | RUN apt-get -y install openssh-server 10 | RUN apt-get clean 11 | 12 | RUN useradd -m winbox 13 | RUN echo "winbox:winbox" | chpasswd 14 | 15 | RUN wget -q -O /winbox.exe http://download2.mikrotik.com/winbox.exe 16 | 17 | RUN mkdir /var/run/sshd 18 | 19 | EXPOSE 22 20 | VOLUME ["/home/winbox"] 21 | 22 | CMD ["/usr/sbin/sshd", "-D"] 23 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | Docker container that executes winbox (Mikrotik RouterOS configurator) 2 | on Wine inside Debian Wheezy. 3 | 4 | Image installation 5 | ------------------ 6 | 7 | $ docker build -t zanardo/winbox github.com/zanardo/docker-winbox 8 | 9 | 10 | Host dependencies 11 | ----------------- 12 | 13 | # aptitude install sshpass openssh-client 14 | # wget -O /usr/local/bin/winbox.sh \ 15 | https://raw.githubusercontent.com/zanardo/docker-winbox/master/winbox.sh 16 | # chmod 755 /usr/local/bin/winbox.sh 17 | 18 | The X11 server on host must listen on TCP, for SSH X11 forwarding to work. 19 | 20 | 21 | Running the container 22 | --------------------- 23 | 24 | $ winbox.sh 25 | 26 | A container will be created, showing winbox GUI on the host machine. After 27 | winbox is closed, the container will be destroyed, but Wine configurations and 28 | winbox downloaded DLLs will persist on host $HOME/.docker-winbox. 29 | --------------------------------------------------------------------------------