Last active
September 23, 2024 12:09
-
-
Save mitchwongho/11266726 to your computer and use it in GitHub Desktop.
Docker 'run' command to start an interactive BaSH session
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
# Assuming an Ubuntu Docker image | |
$ docker run -it <image> /bin/bash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
sudo docker run -it --entrypoint /bin/bash node:latest #Thanks to @jghaines
...........9e0d1dcbc703 node:latest "/bin/bash" 12 minutes ago Up 12 minutes trusting_yonath #Thanks to Solomon Hykes
sudo docker trusting_yonath bash -c "echo 'Hello World, again!' >> file.txt" #Thanks to Stackoverflow
...........bin boot dev etc file.txt home lib lib64 media mnt opt proc root run sbin srv sys tmp usr var #Thanks to Stallman&Torvalds
Thanks to Github