Introduction: Docker is a qualified Java development engineer must master the knowledge, fox will write down their own understanding, this article only represents my summary and understanding, if there are mistakes, welcome to correct…
1. Enter the container
Docker exec -it suning sh
2. Copy files from the local computer to the host computer
Docker cp/XXX /xx. TXT suning:/ XXX /xx/
3. Copy files from the host computer to the local computer
Docker cp suning:/ XXX /xx.txt/XXX/XXX /
Docker save -o nginx.tar nginx:latest or docker save > nginx.tar nginx:latest
Nginx. tar is the target file. Nginx :latest is the name of the source image (name:tag).
5. Import. Tar to the local image and load the image package
Docker load -i xxx.tar docker load -i xxx.tar
Search the mirror
Docker search [options] Image name
Pull the mirror
Docker pull [options] Image name [: tags]
To view the log after the specified time, only the last 100 lines are displayed:
$ docker logs -f -t –since=”2018-02-08″ –tail=100 CONTAINER_ID
View logs generated in the last 30 minutes:
$ docker logs –since 30m CONTAINER_ID
To view logs after a certain time:
$ docker logs -t –since=”2018-02-08T13:23:37″ CONTAINER_ID
Viewing logs of a specified period:
$ docker logs -t –since=”2018-02-08T13:23:37″ –until “2018-02-09T12:23:37” CONTAINER_ID
The directory where logs are saved in docker is
Var/lib/docker/containers/container name corresponding to the folder
Conclusion: Ever is to learn to read people’s blog technology, some of them have essence blog also have to play around the CV of solution, so the decided to study the knowledge sharing for everyone, mainly want to go to the sea after less detours, more positive energy blog, if there are any errors, welcome to point out mistakes, only hope that we can learn knowledge in my blog, Solve the problem, then it is enough. Thank you! (Please note the original source for reprint)