Skip to content
Mikrotik RouterOS inside Docker container
Shell Dockerfile
Branch: master
Clone or download
Latest commit 38b3869 Aug 15, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Create FUNDING.yml Aug 15, 2019
.dockerignore init Aug 22, 2018
.gitignore init Aug 22, 2018
Dockerfile Release of RouterOS changed to 6.46beta28 Aug 9, 2019
LICENSE license added, readme updated Aug 22, 2018
README.md
cron.sh Release of RouterOS changed to 6.44 Mar 2, 2019
docker-compose.yml versions updated in docs and sample Mar 2, 2019
entrypoint.sh init Aug 22, 2018
entrypoint_with_four_interfaces.sh

README.md

Mikrotik RouterOS in Docker

This extrasmall image was created for tests purpose only, for example on this project based unit testing of routeros-api-php library. If you need fully functional "RouterOS in Docker" for production usage look at VR Network Lab project.

How to use

Create your own Dockerfile

List of all available tags is here, latest will be used by default.

FROM evilfreelancer/docker-routeros
ADD ["your-scripts.sh", "/"]
RUN /your-scripts.sh

Use image from docker hub

docker pull evilfreelancer/docker-routeros
docker run -d -p 2222:22 -p 8728:8728 -p 8729:8729 -p 5900:5900 -ti evilfreelancer/docker-routeros

Use in docker-compose.yml

Example is here.

version: "3"

services:

  routeros-6-42:
    image: evilfreelancer/docker-routeros:6.42.12
    restart: unless-stopped
    ports:
      - "12222:22"
      - "12223:23"
      - "18728:8728"
      - "18729:8729"

  routeros-6-44:
    image: evilfreelancer/docker-routeros:6.44
    restart: unless-stopped
    ports:
      - "22222:22"
      - "22223:23"
      - "28728:8728"
      - "28729:8729"

Build from sources

For this you need download project and build everything from scratch:

git clone https://github.com/EvilFreelancer/docker-routeros.git
cd docker-routeros
docker build . --tag ros
docker run -d -p 2222:22 -p 8728:8728 -p 8729:8729 -p 5900:5900 -ti ros

Now you can connect to your RouterOS container via VNC protocol (on localhost 5900 port) and via SSH (on localhost 2222 port).

List of exposed ports

For access via VNC: 5900

Default ports of RouterOS: 21, 22, 23, 80, 443, 8291, 8728, 8729

IPSec: 50, 51, 500, 4500

OpenVPN: 1194

L2TP: 1701

PPTP: 1723

You can’t perform that action at this time.