Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
hubboss / bin / select_cid
Size: Mime:
#!/bin/bash

#
# Works with `boss ps` output to pick out the container ids, and convert them
# into a comma separated list.
#
# Examples:
#
#   Stop all containers matching `docker-index-1.2.3` on aws_prod:
#       $ boss ps aws_prod --grep docker-index-1.2.3 \
#               | select_cid \
#               | xargs boss ps stop
#
#   Remove all containers from an old hub/reghub release:
#       $ boss ps aws_prod --all --grep 'docker-(index|hub)-1.2.3' \
#               | select_cid \
#               | xargs boss rm 
#

grep -v -e '^Host\|^Container\|^Using' | awk '{print $1}' | xargs echo | sed 's/ /,/g'