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