Former-commit-id: da4edc075d5bad0ea48bdda548b0745043a2d88d
Former-commit-id: c1e29b100c2ee62148064614434e0e79e136fd0d
1.0
wanggang 4 years ago
parent 4dfcfc30e0
commit 3e822179be

@ -1 +1,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"
}
}
}
```

@ -1,19 +1,18 @@
name: default
kind: pipeline
name: default
type: docker
steps:
- name: build
image: golang
commands:
- go get
- go build
- name: build
image: golang:1.12
commands:
- go build
- go test
- name: publish
image: plugins/docker
settings:
repo: octocat/hello-world
tags: [ 1, 1.1, latest ]
registry: 172.20.32.1:5000
insecure: true
- name: publish
image: plugins/docker
settings:
registry: 172.20.32.1:5000
repo: 172.20.32.1:5000/go/hello-world
insecure: true
tags: [ 1, 1.1, latest ]

@ -1 +1 @@
image: golang:alpine
FROM alpine

@ -31,17 +31,29 @@ services:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /etc/os-release:/host/etc/os-release:ro
registry: #https://docs.docker.com/registry/deploying/
registry: #https://docs.docker.com/registry/deploying/
image: registry:2.7.1
restart: always
ports:
- 5000:5000 #http://localhost:5000/v2/_catalog
volumes:
- ./data/registry:/var/lib/registry
docker-registry-web:
image: hyper/docker-registry-web:latest
restart: always
ports:
- 9580:8080
depends_on:
- registry
environment:
- REGISTRY_URL=http://registry:5000/v2
- REGISTRY_TRUST_ANY_SSL=true
- REGISTRY_BASIC_AUTH=cm9vdDphQTEyMzQ1NiE=
- REGISTRY_NAME=${IP}
gitea: # init with ip:port https://docs.gitea.io/en-us/install-with-docker
image: gitea/gitea:1.14.2
restart: always
networks:
networks:
- default
environment:
- USER_UID=1000

Loading…
Cancel
Save