Created
June 13, 2014 17:16
-
-
Save marmotte/e6db46963a14c1e4be10 to your computer and use it in GitHub Desktop.
dockerコンテナ起動時にコンテナに振り当てられたIPを取得する docker runのラッパー
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
#/bin/bash | |
echo $@ | |
CONTAINER_ID=$(docker run $@) | |
docker inspect --format='{{.NetworkSettings.IPAddress}}' $CONTAINER_ID |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment