Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save epintos/af72b612bebb7ef2fad7 to your computer and use it in GitHub Desktop.
Save epintos/af72b612bebb7ef2fad7 to your computer and use it in GitHub Desktop.
Ruby on Rails Continuous Integration with Jenkins and Docker Compose
#!/bin/bash +x
docker-compose --project-name=${JOB_NAME} stop &> /dev/null || true &> /dev/null
docker-compose --project-name=${JOB_NAME} rm --force &> /dev/null || true &> /dev/null
docker stop `docker ps -a -q -f status=exited` &> /dev/null || true &> /dev/null
docker rm -v `docker ps -a -q -f status=exited` &> /dev/null || true &> /dev/null
docker rmi `docker images --filter 'dangling=true' -q --no-trunc` &> /dev/null || true &> /dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment