Warning: Stopping docker.service, but it can still be activated by: docker.socket
每次停止docker systemctl stop docker 命令执行完都会提示
Warning: Stopping docker.service, but it can still be activated by: docker.socket
原因
This is because in addition to the docker.service unit file, there is a docker.socket unit file
this is for socket activation. The warning means if you try to connect to the docker socket while the docker service is not running, then systemd will automatically start docker for you. You can get rid of this by removing /lib/systemd/system/docker.socket… you may also need to remove -H fd:// from the docker.service unit file.
ERROR: Failed to Setup IP tables: Unable to enable SKIP DNAT rule: (iptables failed: iptables --wait -t nat -I DOCKER -i br-2add1a39bc5d -j RETURN: iptables: No chain/target/match by that name.
原因是关闭防火墙之后docker需要重启 重启docker即可 service docker restart
2761CentOS Docker 安装
Cannot connect to the Docker daemon Is the docker daemon running?
2767Docker 问题集
Warning: Stopping docker.service, but it can still be activated by: docker.socket
每次停止docker systemctl stop docker 命令执行完都会提示
Warning: Stopping docker.service, but it can still be activated by: docker.socket
原因
This is because in addition to the docker.service unit file, there is a docker.socket unit file
this is for socket activation. The warning means if you try to connect to the docker socket while the docker service is not running, then systemd will automatically start docker for you. You can get rid of this by removing /lib/systemd/system/docker.socket… you may also need to remove -H fd:// from the docker.service unit file.
解释
除了docker.service 单元文件
还有 docker.socket 单元文件 docker.socket用于套接字激活
该警告意味着:如果你试图连接到docker socket 而docker服务没有运行,系统将自动启动docker
解决方案一
你可以删除 /lib/systemd/system/docker.socket
从docker中 docker.service 文件 删除 fd://,即remove -H fd://
解决方案二
如果不想被访问时自动启动服务
输入命令:sudo systemctl stop docker.socket
总结
其实这是个挺人性化的设计,知道意思后,就不想采取什么干预
//blog.csdn.net/weixin_43885975/article/details/117809901
2764Failed to Setup IP tables
ERROR: Failed to Setup IP tables: Unable to enable SKIP DNAT rule: (iptables failed: iptables --wait -t nat -I DOCKER -i br-2add1a39bc5d -j RETURN: iptables: No chain/target/match by that name.
原因是关闭防火墙之后docker需要重启 重启docker即可 service docker restart
2761CentOS Docker 安装
Cannot connect to the Docker daemon Is the docker daemon running?
service docker start
2684Docker 目录共享
docker Linux 安装 Node.js
直接使用已编译好的包
Node 官网已经把 linux 下载版本更改为已编译好的版本了
直接下载解压后使用
#cd /mnt/
#wget https://nodejs.org/dist/v13.9.0/node-v13.9.0-linux-x64.tar.xz
# tar xf node-v13.9.0-linux-x64.tar.xz // 解压
# cd node-v13.9.0-linux-x64 // 进入解压目录
# ./bin/node -v // 执行node命令 查看版本
v13.9.0
解压文件的 bin 目录底下包含了 node、npm 等命令,可以使用 ln 命令来设置软连接:
# ln -sf /mnt/node-v13.9.0-linux-x64/bin/node /usr/local/bin/node
# ln -sf /mnt/node-v13.9.0-linux-x64/bin/npm /usr/local/bin/npm
# npm -v
6.13.7
2665Docker 安装 Alpine
daocloud for Docker toolbox
Windows 7通过Docker toolbox配置镜像加速
在docker toolbox执行下面的命令进入VM bash
dockrer-machine ssh default
执行下面的命令修改profile文件:
sudo vi /var/lib/boot2docker/profile
打开文件之后 敲下i (insert)进入插入模式 然后执行
在–label provider=virtualbox的下一行添加
可以选择下面列出的加速地址之一
--registry-mirror http://aad0405c.m.daocloud.io
--registry-mirror http://f1361db2.m.daocloud.io
添加完成之后
按一下ESC 进入命令模式
按下shift(按住不放)
然后按下冒号
界面最后一行出现冒号后
在冒号后面输入wq保存退出
常用的镜像加速地址
国内的保存镜像的仓库 很快
http://aad0405c.m.daocloud.io
https://registry.docker-cn.com
http://hub-mirror.c.163.com
https://3laho3y3.mirror.aliyuncs.com
http://f1361db2.m.daocloud.io
https://mirror.ccs.tencentyun.com
敲exit退出 重启dockert-machine
docker-machine restart default
检查是否完成
查找Registry Mirrors是否存在刚刚添加的地址http://f1361db2.m.daocloud.io
存在表示成功
docker info
测试是否加速成功 (感受一下飞快的速度!)
docker pull centos