In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "what is the relevant knowledge of Docker". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Next, let the editor take you to learn "what is the relevant knowledge of Docker"?
Root permission is required for all docker operations, and sudo is required:
Docker search gitlab
Search the service image (image) and select the one marked with TRUSTED, which is relatively better.
Docker pull NAME
Download the corresponding image, due to the index.docker.io quilt wall, need a ladder, the download will be very slow.
Docker build-t NAME.
The container is built according to Dockerfile in the current directory.-- rm automatically deletes the container in the intermediate state of build.
Docker run-I-t-p 808080 NAME
Run a Container with supported parameters:
-dDetached or daemon mode, running in the background.
-I-t opens a tty terminal and maintains interactive mode, both of which are generally used together.
-e set environment variable parameters, refer to Install GitLab With Docker.
-p [host_port]: [container_port] maps the HOST port to the container to facilitate external access to the services in the container. Host_port can be omitted, which means mapping container_port to a dynamic port.
-v [host-path]: [container-path] Mount the HOST folder to Container to save data.
-- rm automatically deletes containers that are already running the same IMAGE.
Docker attach-sig-proxy=false CONTAINER
The container that attach runs in the background, plus the-sig-proxy=false parameter can be passed through Ctrl+Cdetach, otherwise once attach cannot be canceled.
Docker commit-- run='COMMAND'-m 'message' CONTAINER IMAGE:tag
Log in to the container and make some changes, log out to HOST and save the changes to the image, or send commands to the running container directly in HOST via-- run and save to the image.
Docker stop/start/restart/kill/rm CONTAINER
Stop, restart, kill, delete containers.
Docker ps-a-Q
Lists the currently running containers,-a lists all, including stopped, and-Q lists only the container ID. Docker ps-a-Q | xargs docker rm can delete all containers that are not running.
Docker logs-f CONTAINER
View the container running log.
Docker cp CONTAINER:/PATH HOSTPATH
Copy the files or folders in the container to HOST. Currently, only one-way copy from Container to HOST is supported, and HOST to Container can be copied through the insert command.
Docker insert IMAGE URL PATH
Write the contents of the URL file to the corresponding PATH. This operation does not modify the original IMAGE content, but creates a new IMAGE based on it.
Docker images
Lists the installed images. You can delete the mirror through docker rmi IMAGE.
Docker inspect CONTAINER | grep IPAddress
Check the container configuration, including internal IP and other information.
At this point, I believe you have a deeper understanding of "what is the relevant knowledge of Docker?" you might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.