清夏晚风

Docker基础

删除未使用镜像:

1
docker image prune -a

Docker Hub镜像加速源

镜像源名称 镜像源 URL
网易 http://hub-mirror.c.163.com
中科大镜像地址 http://mirrors.ustc.edu.cn
中科院 https://mirror.iscas.ac.cn
南京大学 https://docker.nju.edu.cn
百度云 https://mirror.baidubce.com
DaoCloud https://docker.m.daocloud.io
Docker镜像代理 https://dockerproxy.com
中科大github地址 https://github.com/ustclug/mirrorrequest
Azure中国镜像地址 http://mirror.azure.cn
Azure中国github地址 https://github.com/Azure/container-service-for-azure-china
DockerHub镜像仓库 https://hub.docker.com
阿里云镜像仓库 https://cr.console.aliyun.com
Google镜像仓库 https://console.cloud.google.com/gcr/images/google-containers/GLOBAL
Coreos镜像仓库 https://quay.io/repository
RedHat镜像仓库 https://access.redhat.com/containers

阿里云镜像加速:

1
https://<系统自动生成>.mirror.aliyuncs.com

使用watchtower实现自动更新镜像和容器
docker-compose.yml部署

1
2
3
4
5
6
7
8
9
10
11
name: watchtower
services:
watchtower:
container_name: watchtower
restart: always
environment:
- TZ=Asia/Shanghai
volumes:
- /var/run/docker.sock:/var/run/docker.sock
command: --cleanup --interval 60
image: containrrr/watchtower:latest
  • Title:
  • Author: 清夏晚风
  • Created at : 2026-01-13 16:48:23
  • Updated at : 2026-01-13 16:48:23
  • Link: https://blog.kimikkorow.eu.org/虚拟容器技术/Docker/Docker基础/
  • License: This work is licensed under CC BY-NC-SA 4.0.
On this page