2023-11-07 02:38:13 -05:00
|
|
|
# push镜像使用http
|
2024-09-21 23:58:43 -04:00
|
|
|
|
2023-11-07 02:38:13 -05:00
|
|
|
```
|
|
|
|
# 修改配置文件
|
|
|
|
vi /etc/docker/daemon.json
|
|
|
|
{
|
|
|
|
"insecure-registries": ["hy-node4:80"],
|
|
|
|
"exec-opts": ["native.cgroupdriver=systemd"]
|
|
|
|
}
|
|
|
|
# 如果还是不行使用registry
|
|
|
|
docker run -d -p 5000:5000 --restart=always --name registry registry:2
|
|
|
|
```
|
|
|
|
|
2023-09-26 21:05:23 -04:00
|
|
|
```shell
|
|
|
|
# 打包
|
|
|
|
docker buildx build . --tag 172.21.13.108:80/platform-v3/jeecg-boot-system:3.1.0923-mdm
|
|
|
|
# 登陆认证
|
|
|
|
root@shixiaohua:/run/containerd# docker login http://172.21.13.108:80
|
|
|
|
Username: admin
|
|
|
|
Password:
|
|
|
|
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
|
|
|
|
Configure a credential helper to remove this warning. See
|
|
|
|
https://docs.docker.com/engine/reference/commandline/login/#credentials-store
|
|
|
|
|
|
|
|
Login Succeeded
|
|
|
|
# 打标签 docker tag imageId ip:port/name:version
|
|
|
|
docker tag 4d69ba36298c 172.21.13.108:80/platform-v3/jeecg-boot-system:3.1.0922-mdm
|
|
|
|
# 推送远程仓库
|
|
|
|
docker push 172.21.13.108:80/platform-v3/jeecg-boot-system:3.1.0922-mdm
|
|
|
|
```
|