Container network configuration
IBM's implementation of Docker supports two network operation modes.
- --net="host"
-
The Container shares networking with the host OS. Only one Appliance Container that uses --net="host" can run at one time on a single host. When using --net="host", some ports that are used by services inside the Container can conflict with ports that are opened by services in your hosts network namespace. These ports can be remapped by using the DS_CNC_* variables noted in Container environment variables or reconfigured through the Manager Web Interface for the Accesser service.
Example: Command line to start an Accesser Container with --net="host".
# sudo docker run -itd --env=“DS_MANAGER_IP=192.168.79.15” --env=“DS_MANAGER_AUTOACCEPT=true” -v /home/data/container-data-1:/container-persistence:rw --net=“host” clevos-accesser:3.19.4.1
localhost as its hostname when using an
Appliance Container.- --net="bridge"
-
The Container uses a separate network namespace from the host OS. Docker automatically allocates an internal NAT-like network. Some ports must be published from the Container to the host.
Example: Command line with --net="bridge".
This command starts an Accesser Container and maps:
- Host HTTP port
9080to Container port8080 - Host HTTPS port
9443to Container port8443 - Host port
27015to Container port8088
# sudo docker run -itd --hostname=“accesser-container.example.com” -p 9080:8080 -p 9443:8443 -p 27015:8088 --env=“DS_CNC_EXTERNAL_CONNECT_PORT=27015” --env=“DS_CNC_EXTERNAL_CONNECT_IP=192.168.79.99” --env=“DS_MANAGER_IP=192.168.79.15” --env=“DS_MANAGER_AUTOACCEPT=true” -v /home/data/container-data-1:/container-persistence:rw --net=“bridge” clevos-accesser:3.19.4.1 - Host HTTP port
-p) flag for Docker.localhost.- Example: Container Mode with bridge network.
- This command starts an Accesser Container and maps:
- Host HTTP port
9080to Container port8080 - Host HTTPS port
9443to Container port8443 - Host port
27015to Container port8088 - Host Service API port
9337to Container port8337 - Host Service API (Secure) port
9338to Container port8338
# sudo docker run -itd --hostname=“accesser-container.example.com” -p 9080:8080 -p 9443:8443 -p 27015:8088 -p 9337:8337 -p 9338:8338 --env=“DS_CNC_EXTERNAL_CONNECT_PORT=27015” --env=“DS_CNC_EXTERNAL_CONNECT_IP=192.168.79.99” --env=“DS_MANAGER_IP=192.168.79.15” --env=“DS_MANAGER_AUTOACCEPT=true” -v /home/data/container-data-1:/container-persistence:rw --net=“bridge” clevos-accesser:3.19.4.1 - Host HTTP port