Former-commit-id: da4edc075d5bad0ea48bdda548b0745043a2d88d Former-commit-id: c1e29b100c2ee62148064614434e0e79e136fd0d1.0
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
|
kind: pipeline
|
||||||
|
name: default
|
||||||
type: docker
|
type: docker
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build
|
- name: build
|
||||||
image: golang
|
image: golang:1.12
|
||||||
commands:
|
commands:
|
||||||
- go get
|
- go build
|
||||||
- go build
|
- go test
|
||||||
|
|
||||||
- name: publish
|
- name: publish
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
settings:
|
settings:
|
||||||
repo: octocat/hello-world
|
registry: 172.20.32.1:5000
|
||||||
tags: [ 1, 1.1, latest ]
|
repo: 172.20.32.1:5000/go/hello-world
|
||||||
registry: 172.20.32.1:5000
|
insecure: true
|
||||||
insecure: true
|
tags: [ 1, 1.1, latest ]
|
@ -1 +1 @@
|
|||||||
image: golang:alpine
|
FROM alpine
|
Loading…
Reference in new issue