Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/washira/docker-ubuntu
https://github.com/washira/docker-ubuntu
Last synced: about 7 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/washira/docker-ubuntu
- Owner: Washira
- Created: 2023-09-18T07:37:47.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-18T08:18:51.000Z (about 1 year ago)
- Last Synced: 2023-09-18T09:39:24.522Z (about 1 year ago)
- Size: 4.88 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Docker-Ubuntu
## Docker pull
$ `docker pull ubuntu:20.04`## Run with connected bash with closing and remove after exit
$ `docker run -it --rm --name ubuntu ubuntu:20.04 /bin/bash`## Run with connected bash with no need remove
$ `docker run -it --name ubuntu ubuntu:20.04 /bin/bash`
$ `docker exec -it ubuntu /bin/bash`## Run in detached mode
$ `docker run -id --name ubuntu ubuntu:20.04`
$ `docker exec -it ubuntu /bin/bash`## Saving the docker container state (result --> new image with all changes)
$ `docker commit -p container_id new_container_name`## Run in detached mode with mounted directories
$ `docker run -v /dir-on-host:/dir-in-container -id --name ubuntu ubuntu:20.04`
$ `docker exec -it ubuntu /bin/bash`