How can I change a docker container from Bridge network to Host? Using DSM6 on a Synology

Using Docker on a Synology NAS. I would like to change the network from Bridge to Host.

I don’t think this is possible from the UI. Can anyone tell me how to do this from the command line, or what switch to specify when creating the container from the command line?

Thanks

I’m sure that the author of the question has found the solution long time ago.
But I hope this information will be useful for somebody else in the future.
To change the network attached to a container in Synology Docker you need to ssh to your NAS and run the commands:

sudo docker network disconnect NetworkName ContainerName

  • to disconnect a container from a certain network

and

sudo docker network connect NetworkName ContainerName

  • to connect a container to a certain network

See docker --help for the details.

Or you can install Portainer into your Synology DSM Docker and do all the same in Portainer

That you for trying to help even if the question is old. However, the question was probably not about connecting and disconnecting docker networks but changing from bridge mode to host network mode which can be done by using the --network host option but that can’t be changed on a running container.