Created
February 26, 2018 08:25
-
-
Save Neoglyph/6f64b0a1b95fd8ecb295efcab97ab4aa to your computer and use it in GitHub Desktop.
Docker getting inside a container or image
This file contains hidden or 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
// Found on stackoverflow from: https://stackoverflow.com/users/5641227/khalil-gharbaoui | |
This command should let you explore a running docker container: | |
docker exec -it name-of-container bash | |
once inside do: | |
ls -lsa | |
or any other bash command like: | |
cd .. | |
This command should let you explore a docker image: | |
docker run --rm -it --entrypoint=/bin/bash name-of-image | |
once inside do: | |
ls -lsa | |
or any other bash command like: | |
cd .. | |
The -it stands for interactive... and tty |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment