How can I customize or reconfigure the default docker bridge IP address?
0
1 Answer
0
Best Answer
Please take note of the following before continuing:
- This is considered an advanced topic, please take backups of the environment before making any changes.Â
- Docker is a system dependency for Hyperview. It is not a Hyperview service. Docker uses its own configurations and options which are beyond the Hyperview scope.
- In some cases the default network configuration used by Docker is not suitable.
To reconfigure docker01 network interface:
- Navigate to /opt/datacollector/dc-docker-stack.
- Run docker compose down to stop the Data Collector containers.
- Navigate to /etc/docker.
- Create or update the daemon.json configuration file for Docker.
- Add the following parameters to daemon.json. Insert the IP address that Docker should use. Only specify the settings you need to customize. You can set your own specific IP range here, the example uses a sample IP address.
- Stop the docker service with systemctl stop docker.
- Start the docker service with systemctl start docker.
- Navigate to /opt/datacollector/dc-docker-stack.
- Run docker compose up -d to start the Data Collector containers.
{ "bip": "192.168.1.1/24" }
To reconfigure the docker bridge network interface:
In some cases the bridge IP address used by Docker in the default configuration is not suitable. In those cases one option is to switch to using host networking mode in the docker compose configuration.
- Navigate to /opt/datacollector/dc-docker-stack.
- Run docker compose down to stop the Data Collector containers.
- Edit the docker-compose.yaml file.
- Add network-mode: host parameter to each data collector container section under image.
- Â Run docker compose up -d to start the Data Collector containers.
services:
 discovery-service:
  image: hvregistry.azurecr.io/dc-discovery-service:4.6.0.0-JazzyCrocodile-stable
  network_mode: host
  restart: always
Important: Changes to docker compose will be overwritten with each Hyperview Data Collector upgrade. These overrides will need to be reimplemented after a Data Collector upgrade.