-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes docker-compose cannot set static ip when use ipam
Signed-off-by: zhangguanzhang <[email protected]>
- Loading branch information
1 parent
ed6f399
commit c0de4a4
Showing
3 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
version: "3.2" | ||
services: | ||
test: | ||
image: alpine | ||
networks: | ||
net1: | ||
ipv4_address: 10.123.0.253 | ||
tty: true | ||
command: ["top"] | ||
|
||
networks: | ||
net1: | ||
driver: bridge | ||
ipam: | ||
driver: default | ||
config: | ||
- subnet: 10.123.0.0/24 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# -*- bash -*- | ||
|
||
podman container inspect ipam_set_ip_test_1 --format '{{ .NetworkSettings.Networks.ipam_set_ip_net1.IPAddress }}' | ||
like "$output" "10.123.0.253" "$testname : ip address is set" |