summaryrefslogtreecommitdiffstats
path: root/sdc-os-chef/scripts/docker_login.sh
blob: 6309fda20ea2631a6f14459015cba5203ea1da2d (plain)
1
2
3
4
5
6
7
8
9
pat=$1
docker_ids=`docker ps | grep ${pat} | awk '{print $1}'|head -1`
if [ -z "$docker_ids" ]; then
   echo "No dockers were found matching pattern [${pat}]"
   exit 0
else 
   docker exec -it ${docker_ids} bash
fi