Continuous integration and deployment example with docker
- docker 17 +
- docker-compose 1.16 +
In the root directory execute the following command:
docker build -t maven:alpine maven/.
This command will generate the maven image that will be use to build the source code.
You can check if the image has been created executing the following command
docker images
In the project root's directory execute the following commands:
docker-compose -f docker-ci.yml run --rm maven clean test
In the project root's directory execute the following commands:
docker-compose -f docker-ci.yml run --rm maven clean package
Execure the following command:
docker-compose build
This command will generate a docker image called rauccapuclla/devops-docker
Just execute the following command:
docker-compose up -d
curl http://localhost:8080
The response should be "Applicacion de laboratorio V1"