Created
July 26, 2022 11:07
-
-
Save njsubedi/c443302c13695efa945b5dd251bae311 to your computer and use it in GitHub Desktop.
Enter into the shell of latest run docker container.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
LAST_CONTAINER_ID=$(docker ps | head -n 2 | tail -n 1 | awk '{print $1}') | |
docker exec -it $LAST_CONTAINER_ID /bin/sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment