Last active
July 20, 2023 18:40
-
-
Save dinhanhhuy/45c7cfae4b197237cc372dc3dea0f534 to your computer and use it in GitHub Desktop.
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
# create meta data file for network namespace | |
$ pid=$(docker inspect -f '{{.State.Pid}}' ${container_id}) | |
$ mkdir -p /var/run/netns/ | |
$ ln -sfT /proc/$pid/ns/net /var/run/netns/[container_id] | |
# list all the network namespace on host | |
$ ip netns ls | |
c84ad4878642 (id: 77) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment