Skip to content

Latest commit

 

History

History
106 lines (69 loc) · 2.67 KB

Docker Usage Instructions.md

File metadata and controls

106 lines (69 loc) · 2.67 KB

Docker Instructions


Installation

  • Download and Install Docker Toolbox for Windows Docker Toolbox
  • Check whether you have everything up and running properly
$ docker version

Build Instructions

There are couple of ways to engage Docker within GTAS

  1. Option1: Type in individual Docker commands
  2. Option2: Let docker-compose handle the process of building and deploying

Option 1 - Docker commands You would need to build two images for GTAS to run , Image 1: gtas_tomcatgtas Image 2: gtas_mariahost

From under GTAS root folder, issue these commands

        $ docker build -f gtas-parent/docker/tomcat.Dockerfile .

This would build you a gtas_tomcatgtas image, the following command will let you check whether this image has been created or not.

        $ docker images

This should display something like this

    λ  docker images
REPOSITORY              TAG                 IMAGE ID            CREATED             SIZE
gtas_tomcatgtas         latest              28c1f48c7838        2 days ago          549MB

Repeat similar process to build gtas_mariahost image

From under gtas-parent/gtas-commons directory

        $ docker build -f db.Dockerfile .

This would build you a gtas_mariahost image, again check it with

        $ docker images

This should display something like this

gtas_mariahost          latest              85a27e79b2bb        2 days ago          339MB

Once you are done with these steps, skip to Run Containers section

Option 2 - docker-compose

An easier option is to kick-off docker-compose YAML file that will build images and run containers for us.

From under the GTAS root directory, issue this command

        $ docker-compose build

This single command will build you two images, gtas_mariahost and gtas_tomcatgtas.

Now, you can check the images again with

        $ docker images

and proceed to Run Containers section

Run Containers

These following commands help you to start Docker containers

  • Start with mariahost first
        $ docker run -d --rm --name mariahost -p 3306:3306 gtas_mariahost
  • Then kick off Tomcat
$ docker run -d --rm --name tomcat -p 8080:8080 --link mariahost:mariahost gtas_tomcatgtas

Give it a couple mins

and then open up the login screen going to http://localhost:8080/gtas