In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the relevant knowledge of "what common problems exist when Docker is used". In the operation process of actual cases, many people will encounter such difficulties. Next, let Xiaobian lead you to learn how to deal with these situations! I hope you can read carefully and learn something!
What if I can't download the image or it's slow?
You can try the mirror source provided by this site, for example, to download the 14.04 mirror of ubuntu repository, you can use
sudo docker pull dl.dockerpool.com:5000/ubuntu:14.04
After that, modify the tag:
sudo docker tag dl.dockerpool.com:5000/ubuntu:14.04 ubuntu:14.04
You can also use mirror acceleration provided by daocloud ( www.daocloud.io):
First register an account in daocloud. After logging in, a mirror address will be assigned. Configure the mirror address to docker (I use it under mac).
boot2docker ssh
sudo su
echo "EXTRA_ARGS=\"--registry-mirror=http://xxxxxx.m.daocl
oud.io\"" >> /var/lib/boot2docker/profile
Then you can download images from docker's official website, such as ubuntu 14.04
Direct input:
docker pull ubunt:14.04
Pulling repository ubuntu
8eaa4ff06b53: Download complete
511136ea3c5a: Download complete
3b363fd9d7da: Download complete
607c5d1cca71: Download complete
f62feddc05dc: Download complete
Status: Downloaded newer image for ubuntu:14.04
How to quickly view local mirrors and containers?
You can quickly view local images via docker images; you can quickly view local containers via docker ps -a.
How do I enter the container after starting it?
Docker attach or nenter, please refer to http://www. dockerpool. com/static/books/docker_practice/container/enter.html.
What is the difference between Docker and Virtual Machines?
Docker is a lightweight sandbox in which only applications run, and there are additional systems inside the virtual machine.
Is Docker safe?
Docker takes advantage of many security features in the Linux kernel to ensure isolation between different containers and to verify images through signature mechanisms. A large number of deployments in production environments prove that Docker, while not as isolated as virtual machines, still has extremely high security.
How to clean up containers that stop in the background?
You can use the sudo docker rm $sudo( docker ps -a -q) command.
How do I check the environment variables supported by mirroring?
You can use the docker run IMAGE env command.
Start container prompt: exec format error?
Check that the startup command has executable permissions, enter the container and manually run the script for troubleshooting.
Where are the local mirror files stored?
Local resources related to Docker are stored in/var/lib/docker/directory, where container directory stores container information, graph directory stores image information, and aufs directory stores specific content files.
How to exit a mirrored bash without terminating it?
Press Ctrl-p Ctrl-q.
Delete automatically when exiting container?
Use the--rm option, e.g. sudo docker run --rm -it ubuntu
Docker started containers, the system does not see the network namespace?
See http://www.dockerpool.com/article/1417585261.
Where is Docker's configuration file located and how do I modify it?
The configuration file for Ubuntu is/etc/default/docker, and for Centos is/etc/sysconfig/docker. Ubuntu configuration file below the content is as follows, readers can refer to the configuration. (If the file does not exist, restart or create a new file can solve it.)
# Docker Upstart and SysVinit configuration file
# Customize location of Docker binary (especially for development testing).
DOCKER="/usr/local/bin/docker"
# Use DOCKER_OPTS to modify the daemon startup options.
DOCKER_OPTS="--dns 8.8.8.8 --dns 8.8.4.4 --insecure-registry dl.dockerpool.com:5000"
# If you need Docker to use an HTTP proxy, it can also be specified here.
export http_proxy="http://127.0.0.1:3128/"
# This is also a handy place to tweak where Docker's temporary files go.
export TMPDIR="/mnt/bigdrive/docker-tmp"
The content of "What are the common problems when using Docker" is introduced here. Thank you for reading it. If you want to know more about industry-related knowledge, you can pay attention to the website. Xiaobian will output more high-quality practical articles for everyone!
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.