Docker on VyOS

Hi,

I made VyOS which can run Docker for fun :slight_smile:

ISO:
https://github.com/higebu/build-iso/releases/download/vyos%2F1.1.1-docker/VyOS-livecd-1412091651-cff5913-amd64.iso

Branches:

Usage:

  1. Install and start docker
configure
set system package repository squeeze url http://ftp.jp.debian.org/debian/
set system package repository squeeze distribution squeeze
set system package repository squeeze components 'main contrib non-free'
set system package repository squeeze-lts url http://ftp.jp.debian.org/debian/
set system package repository squeeze-lts distribution squeeze-lts
set system package repository squeeze-lts components 'main contrib non-free'
commit
save
sudo apt-get update
curl -sSL https://get.docker.com/ | /bin/sh
sudo usermod -aG docker vyos
# logout and login
sudo sed -i '/--no-close/d' /etc/init.d/docker
sudo /etc/init.d/docker start
  1. Run debian container
docker run -it debian:latest /bin/bash

And I try to make VyOS docker image now. But the image can not get IP…
https://registry.hub.docker.com/u/higebu/vyos/

Wow! great concept.

Did you manage to get any further with this?

We were thinking of trying something like this to get over the lack of vrf-lite or MPLS. Just run vyos in a docker container!

The concept appears to be gaining traction with quagga - some patches (which I haven’t used) have been on the quagga-dev mailing for a while. https://lists.quagga.net/pipermail/quagga-dev/2014-November/011803.html
I read through the thread this morning and it appears they are umming and arring on whether to have multiple processes, for each namespace, or whether to expand the data structures to support a VRF tag passed between single processes. (Or even both based on the list).

The pragmatic short term solution is definitely getting vyos-in-docker working. Centralised control-plane on the VM/baremetal VyOS instance would be sugar on top.

Exciting stuff though.

Hi,

I’m trying to get linux containers working in vyos. I need a recent linux kernel for hw support, so the beta build based on jessie with 4.4 kernel is great.
I see you guys seem to have got docker working in the squeeze based versions, so I was wondering if you could share some insights on the required steps to get this working.

It seems the kernel config for vyos does not enable all the cgroups required by lxc to mount and run. I have set up a build environment for vyos based on jessie and can build the iso.
What would be the correct way to configure and enable these cgroups in this build setup?

Thanks,
hp

VyOS kernel source is here: GitHub - vyos-legacy/vyos-kernel: VyOS version of the Linux kernel. And this is a submodule of vyos-build. See vyos-build/packages at current · vyos/vyos-build · GitHub.
So you can use your forked vyos-kernel in vyos-build with git submodule.

Thanks!

Hi higebu,

Thanks for taking the time! I’ll try to read up on the live-build setup, but would the main steps then be to

  • clone the vyos-kernel and configure it to include nessecary cgroups and then build
  • configure vyos-build to include the local kernel
  • run vyos-build again

Sorry for the noob-ish questions, I’m not a kernel-hacker (yet :slight_smile:

Thanks again!

vyos-1.2.0-rolling can run docker with additional disk. Details: Docker on VyOS 1.2 · GitHub