2022-04-07 14:48:54 +03:00
build :
from :
type : docker
2024-03-20 20:53:11 +02:00
url : docker://ghcr.io/project-zot/golang:1.22
2022-04-07 14:48:54 +03:00
binds :
2022-11-11 07:55:07 +02:00
- ../. -> /zotcopy
2022-04-07 14:48:54 +03:00
run : |
export GO111MODULE=on
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'
mkdir -p /go/src/github.com/project-zot
cd /go/src/github.com/project-zot
git clone /zotcopy zot
cd /go/src/github.com/project-zot/zot
2022-05-25 18:53:02 +03:00
make COMMIT=${{COMMIT}} clean binary
2022-04-07 14:48:54 +03:00
cat > config.json << EOF
{
"storage" : {
"rootDirectory" : "/var/lib/registry" ,
"gc": false ,
"dedupe": false
},
"http" : {
"address" : "0.0.0.0" ,
"port" : "5000"
},
"log" : {
"level" : "debug"
}
}
EOF
cat config.json
2022-05-25 18:53:02 +03:00
2022-11-11 07:55:07 +02:00
mkdir -p /zotcopy/.build/${{REPO_NAME}}/binary
mkdir -p /zotcopy/.build/${{REPO_NAME}}/cert
mkdir -p /zotcopy/.build/${{REPO_NAME}}/config
cp /go/src/github.com/project-zot/zot/bin/zot-linux-amd64 /zotcopy/.build/${{REPO_NAME}}/binary
cp /go/src/github.com/project-zot/zot/config.json /zotcopy/.build/${{REPO_NAME}}/config
cp /etc/ssl/certs/ca-certificates.crt /zotcopy/.build/${{REPO_NAME}}/cert
2022-04-07 14:48:54 +03:00
build_only : true
"${{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}}
2022-04-07 14:48:54 +03: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 :
2022-05-25 18:53:02 +03:00
- /usr/bin/zot-linux-amd64
2022-04-07 14:48:54 +03:00
volumes :
- /var/lib/registry
cmd :
- serve
- /etc/zot/config.json