echo "Deploying network and containers..." docker network create --driver bridge wit-net docker run -d \ --name wit-blue \ --env COLOR=lightblue \ --network wit-net \ xian310/who-is-there:21 docker run -d \ --name wit-pink \ --env COLOR=pink \ --network wit-net \ xian310/who-is-there:21 docker run -d \ --name nginx \ --network wit-net \ --publish 8000:80 \ -v $(pwd)/nginx.conf:/etc/nginx/nginx.conf:ro \ nginx:1.21.3 sleep 2 docker ps echo echo "Waiting 10 seconds..." sleep 10 echo echo "Access to the APIs" nginx_internal_ip=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' nginx) for url in "$nginx_internal_ip:80/blue" "$nginx_internal_ip:80/pink" "127.0.0.1:8000/blue" "127.0.0.1:8000/pink" do echo echo "curl $url" curl "$url" done