LoginSignup
97
88

More than 5 years have passed since last update.

Docker: ホストからコンテナのIPアドレスを取得したい

Posted at

docker inspectでコンテナの情報をJSON形式で取れる。加えて、--formatで取得したいキーを絞ることことができる。

$ sudo docker inspect --format '{{ .NetworkSettings.IPAddress }}' コンテナIDまたはコンテナ名
172.17.0.8
97
88
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
97
88