You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
865 B
37 lines
865 B
# gitea + drone + drone runner + registry 作为 git 服务器,自动测试、构建和打包镜像并发布到私有仓库
|
|
|
|
|
|
## docker compose 配置网络后才能访问到宿主机 ip
|
|
```
|
|
networks:
|
|
default:
|
|
name: mynetwork
|
|
driver: bridge
|
|
ipam:
|
|
config:
|
|
- subnet: 172.172.0.0/24
|
|
```
|
|
|
|
## 修改docker配置使用镜像和私有http仓库
|
|
修改 /etc/docker/daemon.json 文件的 registry-mirrors 和 insecure-registries属性
|
|
```
|
|
{
|
|
"registry-mirrors": [
|
|
"https://registry.docker-cn.com",
|
|
"http://hub-mirror.c.163.com",
|
|
"https://docker.mirrors.ustc.edu.cn"
|
|
],
|
|
"insecure-registries": ["172.20.32.1:5000"],
|
|
"debug": false,
|
|
"experimental": false,
|
|
"features": {
|
|
"buildkit": true
|
|
},
|
|
"builder": {
|
|
"gc": {
|
|
"enabled": true,
|
|
"defaultKeepStorage": "20GB"
|
|
}
|
|
}
|
|
}
|
|
``` |