Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

docker ps grep container id

docker ps --filter status=running --filter publish="$PORT" --format "table {{.ID}}	" | grep -m2 "" -o -n | tail -n1 | sed 's/2://g'
 
PREVIOUS NEXT
Tagged: #docker #ps #grep #container #id
ADD COMMENT
Topic
Name
2+7 =