In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
Docker how to create custom containers, I believe that many inexperienced people do not know what to do, so this article summarizes the causes of the problem and solutions, through this article I hope you can solve this problem.
1. Install dockerbrew cask install docker2 under docker,mac. Check whether docker has successfully installed docker-- versionDocker version 19.03.13, build 4484c46d9d3. Add a domestic mirror source for docker.
Edit: ~ / .docker/daemon.json, add the following, and then restart.
"registry-mirrors": ["https://docker.mirrors.ustc.edu.cn"]4." Create a base environment image and open a container with this image.
In docker, a mirror is like the concept of a class in java, and a container is an object created with an image.
Docker images # checks all existing images. Docker run-it-- name centos centos:latest / bin/bash# create a docker image with centos as the core # docker run command launches a docker container #-it refers to the interactive mode #-name defines the container name # centos:latest is the specific image name and image tag, and defaults to the local docker image library. If the local mirror library does not exist, it will look on docker hub for # / bin/bash is the command running in interactive mode. After running the above code, it will enter the interior of the container.
Other commands about mirroring
Docker rmi id# remove Mirror
Other commands about containers
Docker ps# View now running Container docker ps-a # View all docker containers docker rm ID# Delete Container docker run-itd-- name centos / bin/bash# start Container #-d run docker start id# in the background to start a stopped container exit# exit docker export id centos.tar# export container from the container I don't think I can use this command docker cp local directory id: capacity In-device path # copy the file from the host machine to the container and read the above Have you mastered how to create custom containers in docker? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!
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.