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 <sonam@mymail.com>"

When I run the Docker container with the following command:

  • Vagrant + Docker + Tomcat: sharing webapps folder with container
  • Spring boot connection reset after a few minutes in docker container
  • Can I clean /var/lib/docker/tmp?
  • docker push has integrity failures from a given commit and onwards
  • mongod doesn't stop (docker debian:wheezy)
  • error: unexpected end of file (expecting “do”) for shell script in Dockerfile
  • 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

  • docker is not VM , why container need base image OS ? [closed]
  • Docker for windows development environment setup
  • Docker image of Java project
  • Dokku/Docker, how to access file in file system of running container?
  • docker compose not linking correctly
  • How is the execution order of docker run command' options (such as “-v” )?Which first execute?
  • One Solution collect form web for “Tomcat with Docker”

    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.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.