Permalink
Browse files

Look for proper organization name.

  • Loading branch information...
darron committed Apr 8, 2014
1 parent a0f04ae commit e99572058e87f4c3cd1bd4fc6ca5243a4b340848
Showing with 3 additions and 2 deletions.
  1. +3 −2 bin/octo
View
@@ -5,10 +5,11 @@ SRC_DIR="/home/git/src/"
PUBLIC_IP=$(curl -s http://ipv4.icanhazip.com)
DOMAIN_SUFFIX="$PUBLIC_IP.xip.io"
ETCD_SERVER="0.0.0.0:4001"
BUILD_ORG_NAME="octoprod"
get_short_container_id ()
{
docker ps | grep "octohost/$1:latest" | cut -d ' ' -f 1
docker ps | grep "$BUILD_ORG_NAME/$1:latest" | cut -d ' ' -f 1
}
get_long_container_id ()
@@ -99,7 +100,7 @@ case "$1" in
clean)
echo "Cleaning old exited containers."
# TODO: Errors if there's no containers - annoying.
docker ps -a | grep -v "octohost\/.*\_data*" | grep "Exit" | cut -d ' ' -f 1 | xargs docker rm
docker ps -a | grep -v "$BUILD_ORG_NAME\/.*\_data*" | grep "Exit" | cut -d ' ' -f 1 | xargs docker rm
echo "Showing all remaining containers."
docker ps -a
echo "Cleaning out all unused images."

0 comments on commit e995720

Please sign in to comment.