2019-08-14 18:26:25 -05:00
|
|
|
build:
|
|
|
|
from:
|
|
|
|
type: docker
|
2024-03-20 13:53:11 -05:00
|
|
|
url: docker://ghcr.io/project-zot/golang:1.22
|
2019-08-14 18:26:25 -05:00
|
|
|
binds:
|
2022-11-11 00:55:07 -05:00
|
|
|
- ../. -> /zotcopy
|
2019-08-14 18:26:25 -05:00
|
|
|
run: |
|
2022-05-25 10:53:02 -05:00
|
|
|
export GO111MODULE=on
|
2019-08-14 18:26:25 -05:00
|
|
|
export GOPATH='/go'
|
|
|
|
export HOME='/root'
|
|
|
|
export PATH='/go/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
|
2021-12-03 22:50:58 -05:00
|
|
|
mkdir -p /go/src/github.com/project-zot
|
|
|
|
cd /go/src/github.com/project-zot
|
2020-11-05 20:57:06 -05:00
|
|
|
git clone /zotcopy zot
|
2021-12-03 22:50:58 -05:00
|
|
|
cd /go/src/github.com/project-zot/zot
|
2023-08-10 14:39:56 -05:00
|
|
|
make COMMIT=${{COMMIT}} OS=${{OS}} ARCH=${{ARCH}} RELEASE_TAG=${{RELEASE_TAG}} clean binary
|
2022-04-07 06:48:54 -05:00
|
|
|
cat > config.json << EOF
|
|
|
|
{
|
|
|
|
"storage":{
|
|
|
|
"rootDirectory":"/var/lib/registry"
|
|
|
|
},
|
|
|
|
"http":{
|
|
|
|
"address":"0.0.0.0",
|
2024-10-31 02:44:04 -05:00
|
|
|
"port":"5000",
|
|
|
|
"compat": ["docker2s2"]
|
2022-04-07 06:48:54 -05:00
|
|
|
},
|
|
|
|
"log":{
|
|
|
|
"level":"debug"
|
2023-02-23 15:28:08 -05:00
|
|
|
},
|
|
|
|
"extensions": {
|
|
|
|
"search": {
|
|
|
|
"enable": true,
|
|
|
|
"cve": {
|
|
|
|
"updateInterval": "2h"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"ui": {
|
|
|
|
"enable": true
|
2023-06-23 00:38:50 -05:00
|
|
|
},
|
|
|
|
"mgmt": {
|
|
|
|
"enable": true
|
2023-02-23 15:28:08 -05:00
|
|
|
}
|
2022-04-07 06:48:54 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
EOF
|
|
|
|
|
|
|
|
cat config.json
|
2022-11-11 00:55:07 -05:00
|
|
|
mkdir -p /zotcopy/.build/${{REPO_NAME}}
|
|
|
|
cd /zotcopy/.build/${{REPO_NAME}}
|
|
|
|
|
|
|
|
mkdir -p binary/ cert/ config/
|
|
|
|
|
2023-08-10 14:39:56 -05:00
|
|
|
cp /go/src/github.com/project-zot/zot/bin/zot-${{OS}}-${{ARCH}} binary/
|
2022-11-11 00:55:07 -05:00
|
|
|
cp /go/src/github.com/project-zot/zot/config.json config/
|
|
|
|
cp /etc/ssl/certs/ca-certificates.crt cert/
|
2019-08-14 18:26:25 -05:00
|
|
|
build_only: true
|
2020-07-09 02:10:11 -05:00
|
|
|
|
2022-04-07 06:48:54 -05:00
|
|
|
"${{REPO_NAME:zot}}":
|
2024-04-01 10:40:09 -05:00
|
|
|
annotations:
|
|
|
|
org.opencontainers.image.description: "OCI-native container image/artifact registry (purely based on OCI Distribution Specification)"
|
2022-11-12 04:08:45 -05:00
|
|
|
os: ${{OS}}
|
|
|
|
arch: ${{ARCH}}
|
2020-07-09 02:10:11 -05:00
|
|
|
from:
|
|
|
|
type: docker
|
2023-11-21 07:54:07 -05:00
|
|
|
url: docker://gcr.io/distroless/base-debian12:latest-${{ARCH}}
|
2022-05-25 10:53:02 -05:00
|
|
|
overlay_dirs:
|
2022-11-11 00:55:07 -05:00
|
|
|
- source: ../.build/${{REPO_NAME}}/binary
|
2022-05-25 10:53:02 -05:00
|
|
|
dest: /usr/local/bin
|
2022-11-11 00:55:07 -05:00
|
|
|
- source: ../.build/${{REPO_NAME}}/cert
|
2022-05-25 10:53:02 -05:00
|
|
|
dest: /etc/ssl/certs
|
2022-11-11 00:55:07 -05:00
|
|
|
- source: ../.build/${{REPO_NAME}}/config
|
2022-05-25 10:53:02 -05:00
|
|
|
dest: /etc/zot
|
2022-04-07 06:48:54 -05:00
|
|
|
entrypoint:
|
2023-08-10 14:39:56 -05:00
|
|
|
- /usr/local/bin/zot-${{OS}}-${{ARCH}}
|
2022-04-07 06:48:54 -05:00
|
|
|
volumes:
|
|
|
|
- /var/lib/registry
|
|
|
|
cmd:
|
|
|
|
- serve
|
|
|
|
- /etc/zot/config.json
|