Docker Usage Notes
Preface
Docker can be said to be a very important project in cloud technology. This project implements Container technology, making software execution no longer limited by system environment, and accelerating the development of the Microservice concept in cloud technology. The following briefly introduces common Docker commands.
Basic Operations
- Leave but do not close container:
Type closely
1
| sudo docker container ls
|
1
| sudo docker attach <ID>
|
1
| sudo container stop <ID>
|
Docker Image Operations
1
| sudo docker pull <hub path>
|
1
| sudo docker run <--gpus all> <-it> <-p 80(local):80(docker)> <-v /data(local):/data(docker) <images> <command>
|
1
| sudo docker commit <ID> <images name>
|
Reference
https://larrylu.blog/step-by-step-dockerize-your-app-ecd8940696f4