request description:
To create a bridge network attached to a network interface on docker host, I have to try the following 3 steps
1.docker network create --driver=bridge --gateway=10.5.107.1 --subnet=10.5.107.0/8 --ip-range=10.5.107.100/30 -o "com.docker.network.bridge.name"="br0" -o "com.docker.network.bridge.host_binding_ipv4"="10.5.107.1" subnet1
2.;ip addr del dev eno1 10.5.107.1/8
3.;brctl addif br0 eno1
4.ip link set br0 up
is it possible to finish the 3 steps above in 1 "docker network" command? is there any option to achieve this?
Describe the results you expected
create a user defined bridge network and attach it to a network interface on docker host with one "docker network create"
Background
I am trying to dockerize my project and encourage users to use run my service inside docker container instead of traditional installation way, I have finished the docker image build and draft a documentation(http://10.3.5.21/doc/advanced/docker/run_xcat_in_docker.html) to run it in docker, I encountered some problem while trying to start container with docker compose instead of following the doc step-by-step, since I can not include the following 2,3,4 steps in the docker-compose.yml:
1.docker network create --driver=bridge --gateway=10.5.107.1 --subnet=10.5.107.0/8 --ip-range=10.5.107.100/30 -o "com.docker.network.bridge.name"="br0" -o "com.docker.network.bridge.host_binding_ipv4"="10.5.107.1" subnet1
2.;ip addr del dev eno1 10.5.107.1/8
3.;brctl addif br0 eno1
4.ip link set br0 up
thanks