What is the URL of my Docker service?

My docker-compose.yml looks like this:

my_app: build: . net: host command: bin/server ports: - "3001:3001"

I start the service like this:

docker-compose up

And I can see that it is running:

my_app_1 | * Listening

But I can't figure out how to access it. None of these work:

localhost:3001
docker-machine:3001
127.0.0.1:3001
0.0.0.0:3001

How can I access my Docker service?

8

1 Answer

docker inspect container_name/hash | grep Address

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like