ansible-bender image for CI/CD
Run the container:
docker run --name nginxexample \
--rm --privileged \
-v /var/run/docker.sock:/var/run/docker.sock \
-v $(pwd):/usr/src:rw \
-it jorgeandrada/ansible-bender bash
Download and install the role and the example:
ansible-galaxy install nginxinc.nginx
wget https://raw.githubusercontent.com/jandradap/ansible-bender/master/examples/nginx-playbook.yml
Build and push to the local daemon, for other storage check here.
ansible-bender build nginx-playbook.yml
ansible-bender list-builds
ansible-bender push docker-daemon:bender-nginx:latest 1
exit
Check local images:
docker images | grep bender-nginx
Run the example container and check:
docker run -d -p 8080:80 bender-nginx
curl http://localhost:8080