2019-08-14 18:26:25 -05:00
|
|
|
build:
|
|
|
|
from:
|
|
|
|
type: docker
|
2022-01-06 15:21:44 -05:00
|
|
|
url: docker://ghcr.io/project-zot/golang:1.17
|
2019-08-14 18:26:25 -05:00
|
|
|
binds:
|
2022-04-07 06:48:54 -05:00
|
|
|
- . -> /zotcopy
|
2019-08-14 18:26:25 -05: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'
|
|
|
|
go get -u github.com/swaggo/swag/cmd/swag
|
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
|
2022-04-07 06:48:54 -05:00
|
|
|
make COMMIT=${{COMMIT}} OS=${{OS}} ARCH=${{ARCH}} binary${{EXT:}}
|
|
|
|
cat > config.json << EOF
|
|
|
|
{
|
|
|
|
"storage":{
|
|
|
|
"rootDirectory":"/var/lib/registry"
|
|
|
|
},
|
|
|
|
"http":{
|
|
|
|
"address":"0.0.0.0",
|
|
|
|
"port":"5000"
|
|
|
|
},
|
|
|
|
"log":{
|
|
|
|
"level":"debug"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
EOF
|
|
|
|
|
|
|
|
cat config.json
|
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}}":
|
2020-07-09 02:10:11 -05:00
|
|
|
from:
|
|
|
|
type: docker
|
2022-05-20 11:52:28 -05:00
|
|
|
url: docker://alpine:3
|
2020-07-09 02:10:11 -05:00
|
|
|
import:
|
2022-04-07 06:48:54 -05:00
|
|
|
- stacker://build/go/src/github.com/project-zot/zot/bin/zot-${{OS}}-${{ARCH}}${{EXT:}}
|
|
|
|
- stacker://build/go/src/github.com/project-zot/zot/config.json
|
|
|
|
- stacker://build/etc/ssl/certs/ca-certificates.crt
|
2020-07-09 02:10:11 -05:00
|
|
|
run: |
|
2022-04-07 06:48:54 -05:00
|
|
|
cp /stacker/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
|
|
|
cp /stacker/zot-${{OS}}-${{ARCH}}${{EXT:}} /usr/bin/zot
|
|
|
|
mkdir -p /etc/zot
|
|
|
|
cp /stacker/config.json /etc/zot/config.json
|
2022-05-22 22:16:11 -05:00
|
|
|
# pie mode binaries need a runtime
|
|
|
|
apk add --no-cache libc6-compat
|
2022-04-07 06:48:54 -05:00
|
|
|
entrypoint:
|
|
|
|
- /usr/bin/zot
|
|
|
|
volumes:
|
|
|
|
- /var/lib/registry
|
|
|
|
cmd:
|
|
|
|
- serve
|
|
|
|
- /etc/zot/config.json
|
|
|
|
|