Last active
February 28, 2024 10:50
-
-
Save romach/9df5fd362788ea2be5046b6d59622c77 to your computer and use it in GitHub Desktop.
Run Ubuntu in 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
# run with connected bash with closing after exit | |
docker run -it --rm --name ubuntu ubuntu:18.04 /bin/bash | |
# run in detached mode | |
docker run -id --name ubuntu ubuntu:18.04 | |
docker exec -it ubuntu /bin/bash | |
# run in detached mode with mounted directories | |
docker run -v /dir-on-host:/dir-in-container -id --name ubuntu ubuntu:18.04 | |
docker exec -it ubuntu /bin/bash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment