Create Images -
Make a directory and copy files from http://platform.cogdevops.com/docker/UIWarImage/
- dockerfile
- insightsUI.sh
- config.env
Execute the following command:
dos2unix *
This command will convert downloded files to UNIX format
Overview of variables to be set in config.env
Variables | Details |
---|
elasticIP | IP of Elastic Search |
postgresIP | IP of PostgreSQL |
neo4jIP | IP of Neo4j |
mqIP | IP of Rabbit MQ |
ldapUrl | URL of LDAP |
bindDN | Bind DN of LDAP |
bindPassword | Password for Bind DN |
searchBaseDN | Base DN for LDAP Search |
jdkURL | URL of Java JDK |
insightsConfigURL | URL of InSightsConfig.zip |
grafanaURL | URL of Grafana |
grafanaLDAP | URL of ldap.toml |
grafanaDefaults | URL of defaults.ini |
insightsUI | URL of InSightsUI.zip |
insightsWar | URL of PlatformService.war |
tomcatURL | URL of apache tomcat |
Update config.env variables and run the below command from the path of copied files.
docker build -t tag_name .
Example : docker build -t insights/ui .
The above command create an image with unique id which will be used to create the containers.
Check the list of images created by,
docker images
Create containers -
Run the image built to create containers
docker run -dit -p 3000:3000 -p 8080:8080 --env-file config.env imageID ping -t localhost
Let ' e10aca6729db ' be the imageID created.
Example : docker run -dit -p 3000:3000 -p 8080:8080 --env-file config.env e10aca6729db ping -t localhost
To list the containers -
docker ps [ For active containers ]
docker ps -a [ For all containers ]
Check logs of container -
docker logs containerID
Let '614bcc4546de' be the containerID created,
Example : docker logs 614bcc4546de
Connect to the container -
User can get into the newly created container where jar is running by ,
docker exec -it containerID bash
Example : docker exec -it 614bcc4546de bash
Check the URLs -
http://hostPublicIP:3000 for grafana
http://hostPublicIP:8080/app for Insights UI