Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker #3

Open
liuhangbin opened this issue Oct 18, 2019 · 0 comments
Open

docker #3

liuhangbin opened this issue Oct 18, 2019 · 0 comments

Comments

@liuhangbin
Copy link
Owner

https://liuhangbin.netlify.com/post/docker/

Install docker Reference https://yeasy.gitbooks.io/docker_practice/install/centos.html
Create docker group 1 2 3 4 5 6 $ sudo groupadd docker $ sudo usermod -aG docker $USER or $ sudo gpasswd -a $USER docker Start docker Pull image 1 2 3 $ docker run hello-world $ docker pull ubuntu:latest $ docker pull fedora:29 Start container 1 2 3 4 5 6 7 8 9 $ docker run unbutu:latest /bin/echo 'Hello World' $ docker run -t -i ubuntu:latest /bin/bash $ docker run -dit bash $ docker container ls $ docker attach $id <- container will stop after exit stdin $ docker exec -it $id bash $ docker container stop $id Show netns with ip 1 2 3 $ docker inspect -f '{{.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant