summaryrefslogtreecommitdiffstats
path: root/sdc-os-chef/scripts/docker_login.sh
blob: 15544f4d240e5b5a6a555f3483014ba4c24e0eaa (plain)
1
2
3
4
5
6
7
8
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