When VyOS runs as docker container, we have some problem with config loads. This appears only for CRUX (1.2.x-1.2.5-eap1) images, on latest rolling all works as expected.
root@df5e848a4876:/# journalctl | grep boot-config-loader Mar 09 13:03:57 df5e848a4876 boot-config-loader[668]: Cannot set up configuration session. root@df5e848a4876:/# cat /var/log/vyatta/vyatta-config-loader.log 2020-03-09 13:03:57 == begin boot-config-loader 2020-03-09 13:03:57 Cannot set up configuration session. root@df5e848a4876:/# cat /var/log/vyatta/vyatta-config-loader.log 2020-03-09 13:03:57 == begin boot-config-loader 2020-03-09 13:03:57 Cannot set up configuration session. root@df5e848a4876:/# /bin/cli-shell-api setupSession terminate called after throwing an instance of 'std::out_of_range' what(): basic_string::erase: __pos (which is 18446744073709551615) > this->size() (which is 0) Aborted (core dumped)
Reproducing:
#Download latest stable ISO mkdir rootfs mkdir unsquashfs #Mount ISO mount -t iso9660 -o loop vyos-1.2.X.iso rootfs/ unsquashfs -f -d unsquashfs/ rootfs/live/filesystem.squashfs #Create container tar -C unsquashfs -c . | docker import - vyosimg/vyos # Run container docker run -d --name vyos --privileged -v /lib/modules:/lib/modules vyosimg/vyos:latest /sbin/init
Only if config loaded successfully, we can enter to the container with following command
docker exec -it vyos su vyos
Also we can use docker exec -it vyos /bin/bash for debugging.