docker配置
docker私服配置
1、修改docker配置文件
/etc/systemd/system/multi-user.target.wants/docker.service
2、添加docker私服地址:
ExecStart=/usr/bin/dockerd-current \ --insecure-registry localhost:8082 \ --add-runtime docker-runc=/usr/libexec/docker/docker-runc-current \ --default-runtime=docker-runc \ --exec-opt native.cgroupdriver=systemd \ --userland-proxy-path=/usr/libexec/docker/docker-proxy-current \ $OPTIONS \ $DOCKER_STORAGE_OPTIONS \ $DOCKER_NETWORK_OPTIONS \ $ADD_REGISTRY \
3、重启docker服务
[root@bogon docker]# systemctl daemon-reload [root@bogon docker]# systemctl restart docker
4、上传镜像
4.1 登陆
docker login 127.0.0.1:8081
4.2 打版本
docker tag jlcon/firstdocker localhost:8082/jlcon/firstdocker:latest
4.3 上传镜像
docker push localhost:8082/jlcon/firstdocker:latest
4.4 查找镜像
docker search localhost:8082/jlcon/firstdocker
启用docker远程访问
编辑:
vim /etc/sysconfig/docker-network
内容:
DOCKER_NETWORK_OPTIONS="-H unix:///var/run/docker.sock -H 0.0.0.0:<端口>"
重启docker服务:
systemctl daemon-reload systemctl restart docker.service
docker命令集
1、删除停止状态容器
docker rm `docker ps -a |awk '{print $1}' | grep [0-9a-z]`
相关推荐
魅惑青花瓷 2020-11-11
yangkang 2020-11-09
MichaelJScofield 2020-11-06
TaoTaoFu 2020-11-06
liaochaowu 2020-11-16
ChlatZed 2020-11-11
lnkToKing 2020-10-29
ChlatZed 2020-10-27
ChlatZed 2020-10-13
时光流水 2020-09-23
yangkang 2020-09-23
changecan 2020-09-22
dusuanyun 2020-09-21
newisI 2020-09-01
liaochaowu 2020-09-14
ShangQuan0 2020-09-10
fearlessxjdx 2020-09-04
libra0 2020-09-02
ChlatZed 2020-08-23