Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Task 2: Creating bridge

1. Create 2 containers using the following commands:

docker container run -d --rm --name box1 busybox /bin/sh -c "while true; do sleep 3600; done“
docker container run -d --rm --name box2 busybox /bin/sh -c "while true; do sleep 3600; done"

2. Create a network bridge:

docker network create box-bridge

3. Connecting two running containers to the network bridge:

docker network connect box-bridge box1
docker network connect box-bridge box2

4. You can use the following command to list docker networks:

docker network ls
Note: You need to include the screenshot of the command output above in your report. (5 points)

5. You can inspect more about the details of the box-bridge network:

docker network inspect box-bridge
Note: You need to include the screenshot of the command output above in your report. Points WILL BE DEDUCTED if any output text get cropped out. (5 points)

6. Log into box1 and try to ping box2:

docker exec -it box1 sh
ping box2
Note: You need to include the screenshot of the command output above in your report. (5 points)