Docker Community Forums

Share and learn in the Docker community.

Having apache web and tomcat app server on the same container?


(natarajan) #1

Hello All,

I am newbie, i need to have apache and tomcat for my java web application running on same machine. do i need to have two separate containers running or i can have one container having both web and app servers running?

Is there a way i can share my containers locally without using docker hub?

Thx,
Nat


(Andy Rothfusz) #2

Hi,

I’m neither an Apache nor Tomcat expert, but I wonder if this official image will help you:
https://registry.hub.docker.com/_/tomcat/

Is there a way i can share my containers locally without using docker hub?

I think you mean “images” and not containers.

Yes – you have four options:

  1. On the same machine you can spin up as many containers from the same image with docker run as you like.
  2. You can use docker save or docker export to dump tar files of your images that you can copy between machines.
  3. You could use the open source docker-registry as a replacement for the storage functions of Docker Hub (it does not include the build system or groups or auth).
  4. Eventually you’ll be able to purchase a license for Docker Hub Enterprise, a commercial version of docker-registry.

(natarajan) #3

Thanks, can I run Apache web server and tomcat on the same container?