docker-registry-ui

Former-commit-id: d04a1e48dae2a9938f0a24d6adb3b78c8be1fc29
Former-commit-id: 0fc40f68b6dff8f73359f8dc9b4de8895fe35bf2
1.0
wanggang 4 years ago
parent 16856a76a2
commit 5d90dc7717

@ -1,6 +1,5 @@
# gitea + drone + drone runner + registry 作为 git 服务器,自动测试、构建和打包镜像并发布到私有仓库
## docker compose 配置网络后才能访问到宿主机 ip
```
networks:
@ -34,4 +33,8 @@ networks:
}
}
}
```
```
## 参考
1. drone 环境变量https://github.com/drone/drone/blob/master/operator/runner/env.go

@ -1,21 +1,28 @@
kind: pipeline
name: default
type: docker
name: default
platform:
arch: amd64
os: linux
steps:
- name: test
image: golang:1.12
image: golang:1.16.4
commands:
- go test
- ls
- name: build
image: golang:1.12
image: golang:1.16.4
commands:
- go build
- ls
- go build -ldflags "-X main.version=${DRONE_COMMIT_SHA:0:8}"
- name: publish
image: plugins/docker
image: plugins/docker:19.03.8
settings:
registry: 172.20.32.1:5000
repo: 172.20.32.1:5000/go/hello-world
insecure: true
tags: [ 1, 1.2, latest ]
tags:
- latest
- ${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}-${DRONE_REPO_BRANCH}-${DRONE_COMMIT_SHA:0:8}

@ -34,22 +34,24 @@ services:
registry: #https://docs.docker.com/registry/deploying/
image: registry:2.7.1
restart: always
environment:
- REGISTRY_STORAGE_DELETE_ENABLED=true
ports:
- 5000:5000 #http://localhost:5000/v2/_catalog
volumes:
- ./data/registry:/var/lib/registry
docker-registry-web:
image: hyper/docker-registry-web:latest
docker-registry-ui:
image: joxit/docker-registry-ui:2.0
restart: always
ports:
- 9580:8080
- 9580:80
environment:
- REGISTRY_TITLE=${IP}:5000
- NGINX_PROXY_PASS_URL=http://registry:5000
- DELETE_IMAGES=true
- SINGLE_REGISTRY=true
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

Loading…
Cancel
Save