Skip to content

registry / 镜像仓库

pull

docker pull [选项] [Docker Registry 地址[:端口号]/]仓库名[:标签]
sh
docker pull gitea/gitea:1.24-nightly

docker run -d -p 8081:8081 --name nexus \
  -v nexus-data:/nexus-data \
  sonatype/nexus3

ubuntu 使用代理的方式

https://gist.github.com/y0ngb1n/7e8f16af3242c7815e7ca2f0833d3ea6?permalink_comment_id=5371919#gistcomment-5371919

sudo systemctl status docker 查看 docker.service

修改 /usr/lib/systemd/system/docker.service,在 [Service] 后面加入代理的配置

Environment="HTTP_PROXY=http://127.0.0.1:7890" Environment="HTTPS_PROXY=http://127.0.0.1:7890" Environment="ALL_PROXY=socks5://127.0.0.1:7890"

然后重启

sh
sudo systemctl daemon-reload
sudo systemctl restart docker

ACR

阿里云

sh
docker login --username=sqinjs registry.cn-chengdu.aliyuncs.com
sh
# 拉
docker pull registry.cn-chengdu.aliyuncs.com/qins-img/xx:[镜像版本号]

# 推
docker tag [ImageId] registry.cn-chengdu.aliyuncs.com/qins-img/xx:[镜像版本号]
docker push registry.cn-chengdu.aliyuncs.com/qins-img/xx:[镜像版本号]