Public | Automated Build

Last pushed: 2 years ago
Short Description
Short description is empty for this repo.
Full Description

centos-java-auto

Base docker image to run a Tomcat application server.
A war file called sample.war will be copied directly to the webapps folder when creating the container.

Usage

You can either pull the repository or build it

Pull this repository

$ docker pull theewook/centos-java-auto

To create the image theewook/centos-java-auto, execute the following command inside the folder

$ docker build -t theewook/centos-java-auto .

To run the image and bind to port :

$ docker run -d -p 8080:8080 theewook/centos-java-auto

Output:

$ docker run -d -p 8080:8080 theewook/centos-java-auto
93aa0e0a3043b00871f453c98663020bddbe8802db5b829b0fc3f85cb7d7a6db

93aa0e0a3043b00871f453c98663020bddbe8802db5b829b0fc3f85cb7d7a6db is the container ID.

To stop the container

$ docker stop container_id

To remove the container

$ docker rm container_id

You can now test your deployment:

http://127.0.0.1:8080/sample/

N.B. If 127.0.0.1 doesn't work try to use the DOCKER_HOST ip instead.

To get the docker host IP:

$ echo HOCKER_HOST

Done!

Docker Pull Command
Owner
theewook
Source Repository

Comments (0)