Running VyOS in a docker container just stops

Hello,

I am trying to play around with VyOS in a docker container. It won’t keep running, it just stops. Can’t figure it out. Can anyone advise please? Thank you

docker run -d --name vyos vyos/vyos-build:current

.
.
Status: Downloaded newer image for vyos/vyos-build:current
186aadf73b29a0b289f095e2258911750c1ae793aca295c60f7120d863ed6a4b

docker ps --all

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
186aadf73b29 vyos/vyos-build:current “/usr/local/bin/entr…” 12 seconds ago Exited (1) 10 seconds ago vyos
.
.
~# docker logs 186
Current UID/GID: 0/0
Usage: gosu user-spec command [args]
eg: gosu tianon bash
gosu nobody:root bash -c ‘whoami && id’
gosu 1000:1 id

gosu version: 1.12 (go1.15.9 on linux/amd64; gc)
gosu license: GPL-3 (full text at GitHub - tianon/gosu: Simple Go-based setuid+setgid+setgroups+exec)

thank you

It is not VyOS in docker container.
It is a “vyos-build” container which includes all pkgs which needed to build .iso
More details in our docs

1 Like

thank you for your reply!

Hello,

I have a similar problem, maybe I misunderstood something.
I’m trying to use Docker to create a container from a Vyos Image.
In a Dockerfile, I specified the following command : FROM vyos/vyos-build:crux.

Then I run in a terminal :

sudo docker build -t vyos . 
sudo docker run -it vyos

And I got the same error as BarrySDCA, :

Current UID/GID: 0/0
Usage: gosu user-spec command [args]
    ie: gosu tianon bash
       gosu nobody:root bash -c 'whoami && id'
       gosu 1000:1 id

gosu version: 1.10 (go1.7.4 on linux/amd64; gc)
     license: GPL-3 (full text at https://github.com/tianon/gosu)

Have you any idea why ?

If you want to run vyos in docker, would you please take this document as a reference?
Running in Docker Container — VyOS 1.4.x (sagitta) documentation