Katlock
Katlock

Reputation: 1386

Tomcat with Docker

I am testing out running a tomcat8 on my Mac. I have the following Dockerfile:

FROM tomcat:8-jre7

MAINTAINER "Sonam Lastname <[email protected]>"

When I run the Docker container with the following command:

docker run -d -P sonam/docker-webapp

I check for the docker process by

docker ps -l

and see the port mapped at:

0.0.0.0:32769->8080/tcp

I am not able to access the tomcat page with localhost:32769 (and even tried to 8080 port).

thanks

-Sonam

Upvotes: 1

Views: 200

Answers (1)

creack
creack

Reputation: 121442

Docker runs in a virtual machine when on Mac. Tomcat will listen to that network interface.

You can run docker-machine ip <name of your docker machine> and access it via that IP instead of localhost.

If on boot2docker, it is similar: boot2docker ip.

Upvotes: 3

Related Questions