Commit 03363c8f by Benedikt

Read exposed port from image meta data using docker inspect

parent fd68919d
...@@ -22,8 +22,8 @@ cid_file=$(mktemp -u --suffix=.cid) ...@@ -22,8 +22,8 @@ cid_file=$(mktemp -u --suffix=.cid)
# it from Docker hub # it from Docker hub
s2i_args="--force-pull=false" s2i_args="--force-pull=false"
# TODO: This should be part of the image metadata # Read exposed port from image meta data
test_port=8080 test_port="$(docker inspect --format='{{range $key, $value := .ContainerConfig.ExposedPorts }}{{$key}}{{end}}' ${IMAGE_NAME} | sed 's/\/.*//')"
info() { info() {
echo -e "\n\e[1m[INFO] $@...\e[0m\n" echo -e "\n\e[1m[INFO] $@...\e[0m\n"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment