Skip to content

Instantly share code, notes, and snippets.

@robinsu
Created July 27, 2020 02:14
Show Gist options
  • Select an option

  • Save robinsu/ed68d0ffc07d1727267633e401cf2c87 to your computer and use it in GitHub Desktop.

Select an option

Save robinsu/ed68d0ffc07d1727267633e401cf2c87 to your computer and use it in GitHub Desktop.
LAST_CONTAINER_ID=$(docker ps -q -n 1)
echo $LAST_CONTAINER_ID
docker exec -it $LAST_CONTAINER_ID /bin/bash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment