https://github.com/arturmareknowak/dockerbridge
Simple experiment with docker networking
https://github.com/arturmareknowak/dockerbridge
bridge docker networking nginx
Last synced: about 1 month ago
JSON representation
Simple experiment with docker networking
- Host: GitHub
- URL: https://github.com/arturmareknowak/dockerbridge
- Owner: ArturMarekNowak
- Created: 2025-01-13T19:15:20.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-01-13T19:48:52.000Z (over 1 year ago)
- Last Synced: 2025-03-05T23:27:37.526Z (over 1 year ago)
- Topics: bridge, docker, networking, nginx
- Language: HTML
- Homepage:
- Size: 172 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# DockerBridge
Simple experiment with docker networking
## Table of contents
* [General info](#general-info)
* [Prerequisites](#prerequisites)
* [Technologies](#technologies)
* [Status](#status)
## Prerequisites
Create two networks:
`docker network create networkOne`
and
`docker network create networkTwo`
## General info
Project contains two nginx containers, each residing in its own network.
Pic.1 Visualization of project run with docker
first we check the config of our default network bridge
`docker network inspect bridge`
and in response we check that ICC option is enabled
```
[
{
...
"Options": {
"com.docker.network.bridge.default_bridge": "true",
"com.docker.network.bridge.enable_icc": "true",
"com.docker.network.bridge.enable_ip_masquerade": "true",
"com.docker.network.bridge.host_binding_ipv4": "0.0.0.0",
"com.docker.network.bridge.name": "docker0",
"com.docker.network.driver.mtu": "1500"
},
"Labels": {}
}
]
```
we run the project with:
`docker compose up`
lets enter one of the containers and run:
`curl http://:8889`
in a response we should get:
```
Hello, Nginx!
Hello, Nginx!
This is a test page served by Nginx in a Docker container.
```
next we stop docker desktop/daemon and add to `%userprofile%/.docker/daemon.json` or `~/.docker/daemon.json`:
```
{
"icc": false
}
```
we start docker again and make sure that ICC is disabled with:
`docker network inspect bridge`
our response is:
```
[
{
...
"Options": {
"com.docker.network.bridge.default_bridge": "true",
"com.docker.network.bridge.enable_icc": "false",
"com.docker.network.bridge.enable_ip_masquerade": "true",
"com.docker.network.bridge.host_binding_ipv4": "0.0.0.0",
"com.docker.network.bridge.name": "docker0",
"com.docker.network.driver.mtu": "1500"
},
"Labels": {}
}
]
```
we run the project again with:
`docker compose up`
we enter one of the containers again and run again:
`curl http://:8889`
in a response we should get again:
```
Hello, Nginx!
Hello, Nginx!
This is a test page served by Nginx in a Docker container.
```
## Technologies
* Docker
* Nginx
## Status
Project is: _finished_