-
-
Save gilangvperdana/10ad9a729b255ea19cd88eb8f3efa725 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