Sample Docker Deployment scripts

Discussion created by joewilliams Employee on Nov 4, 2016
Latest reply on May 30, 2018 by Beverly Mindle

Hey DevTest gang,


I have attached a sample set of deployment scripts for using Docker with DevTest 9.5.1


Most time,  large corporations will want to create their own corporate image to apply customizations to a docker image (jars, other assets),  so attached are some samples that I used for one of our customers...


inside the attached zip  you will find 3 folders







In each of the folders,  you will notice a and a   This is assuming you are using the bridge networking in your docker install.


Looking into the dradis-joe folder here is a bit of an explanation of the files... 


This file will take the existing detest/dradis-base image that is created by the gradle install and call the new image dradis-joe:latest  by processing the included Dockerfile file






This file describes how to build the new image that is being created by the file...


You will notice  there is a and file in the same folder as the docker file.  You will also notice that the Dockerfile has this entry too


ADD devtestlic.xml /opt/devtest/devtestlic.xml


So if you needed to use your devtestlic.xml with your dockerized EDB,  you would place the devtestlic.xml file here,  and run the to generate your new image with your devtestlic.xml


This obviously runs the image that was created in the file


docker run -v /logs/EDB:/root/lisatmp_9.5.1 -d  --name=dradis-joe --net="bridge" dradis-joe:latest


the -v is so I can mount the log volume in the docker container back to the host machine, for ease of seeing the log files without having to connect to the container.




A couple other useful  docker commands..


If you are using bridge mode with your networking,  if you want to find out which IP is assigned to which docker container,  try out  docker network inspect bridge



docker ps    (shows the images that are running in dockers)

docker rm -v $(docker ps -a -q -f status=exited)     - removes images in a status of exited


The final directory  portal-joe  has a couple run commands for starting the portal and the broker in a container.



Hope this helps you out with the "a-ha moment" if you have been struggling with dockers, and how you may be able to implement with DevTest.


Just a FYI,  this is something that is community supported.  If you need further help with rolling out Dockers in your environment,  reach out for some community support,  or local CA account rep  who can put you in touch with our services group 


Cheers,   and have fun.