SONiC icon indicating copy to clipboard operation
SONiC copied to clipboard

Can sonic be run as a container?

Open Prashankalikotayt opened this issue 2 years ago • 1 comments

Hi all, Can sonic be run as a container(linux lxc)? If yes how do we build it or containerize it?

Thanks Regards, Prashant K

Prashankalikotayt avatar Mar 30 '22 11:03 Prashankalikotayt

Yes, it's possible while there are several limitations (e.g. some stats not available) on docker based SONiC.

  • You can find how to run SONiC Virtual Switch on Docker here: https://github.com/Azure/sonic-buildimage/blob/master/platform/vs/README.vsdocker.md
  • Get prebuilt images here: https://sonic-build.azurewebsites.net/ui/sonic/pipelines
    • navigate: "Build History (for Platform=vs)" -> "Artifacts" -> "sonic-buildimage.vs"
    • download image: target/docker-sonic-vs.gz
  • Convenient script to build your own image: https://github.com/antongisli/sonic-builder

ebiken avatar Jun 02 '22 02:06 ebiken

I'm curious about this too. I got my hands on beefy servers with embedded Trident II ASIC.

I wonder if I can run Proxmox on it with SONiC as a LXC container.

What are the known shortcomings regarding the stats?, which ones are missing?

ciroiriarte avatar Jun 17 '23 01:06 ciroiriarte