Java Maven Project Docker Integration Tests

We have a big multi module maven project, wich uses cargo to start a tomcat with some wars, a plugin to insert sql data in a postgres database and then using cucumber we run the integration test suit.

I was reading a lot about Docker, and I could play around with it. So here my question,

  • Jenkins: a heavily branched chain of build jobs
  • How does a remote server with docker images know when to pull a new image built with a CI tool?
  • How to get and present docker states inside html page by javascript?
  • Self hosted Drone CI doesn't synchronize my commits with Github
  • Docker Continuous Integration with AWS
  • Push image vs building on system itself, docker
  • Can Docker replace my integration test that uses cargo?

    What are the benefits?

    What about the performance in comparison with the deploy using cargo?

    Could a suite that starts containers with postgres and tomcat images improve the build time?

    Hope someone can help me here cause I’m pretty exited about docker!

  • Restrict access to docker swarm (manager / configuration)
  • Use sysctl to change kernel params in docker file,will the running container affect Host kernel
  • Dockerfile - How to pass an answer to a prompt post apt-get install?
  • Why do I have to use bash -l -c inside my container?
  • Docker. How to resume downloading image when interrupted?
  • docker-compose : Unsupported config option for services service: 'web'
  • One Solution collect form web for “Java Maven Project Docker Integration Tests”

    • Can Docker replace my integration test that uses cargo?

    Yes Continuous Integration Using docker. This jetty container may come in handy.

    • What about the performance in comparison with the deploy using cargo?

    The performance will be about the same maybe a little slower to start up, depending on what you are doing in the docker container. Docker is more about isolation and repeatability rather than performance. Its way more performant than a virtual machine but not more than cargo on native host.

    • Could a suite that starts containers with postgres and tomcat images improve the build time

    Maybe, depends on what you are doing currently. You could create a known state in your docker container and if you were previously manually creating that state then you may find the build to be faster.

    The real benifit of docker is that you can have a well known state in your postgress database and the tests always run against that known state. Further you do not have to have everyone in your team install postgress locally. The just need to install docker and then the rest will be automated. Please often use docker in conjunction with Vagrant so that even installing docker can scripted and automated.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.