2019-08-14 18:26:25 -05:00
|
|
|
build:
|
|
|
|
from:
|
|
|
|
type: docker
|
2022-10-05 05:21:14 -05:00
|
|
|
url: docker://ghcr.io/project-zot/golang:1.19
|
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
|
2022-10-15 03:14:15 -05:00
|
|
|
make COMMIT=${{COMMIT}} OS=${{OS}} ARCH=${{ARCH}} RELEASE_TAG=${{RELEASE_TAG}} clean binary${{EXT:}}
|
2022-04-07 06:48:54 -05:00
|
|
|
cat > config.json << EOF
|
|
|
|
{
|
|
|
|
"storage":{
|
|
|
|
"rootDirectory":"/var/lib/registry"
|
|
|
|
},
|
|
|
|
"http":{
|
|
|
|
"address":"0.0.0.0",
|
|
|
|
"port":"5000"
|
|
|
|
},
|
|
|
|
"log":{
|
|
|
|
"level":"debug"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
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/
|
|
|
|
|
|
|
|
cp /go/src/github.com/project-zot/zot/bin/zot-${{OS}}-${{ARCH}}${{EXT:}} binary/
|
|
|
|
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}}":
|
2022-11-12 04:08:45 -05:00
|
|
|
os: ${{OS}}
|
|
|
|
arch: ${{ARCH}}
|
2020-07-09 02:10:11 -05:00
|
|
|
from:
|
|
|
|
type: docker
|
2023-02-10 17:52:54 -05:00
|
|
|
url: docker://zothub.io/c3/base:jammy
|
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:
|
2022-05-25 10:53:02 -05:00
|
|
|
- /usr/local/bin/zot-${{OS}}-${{ARCH}}${{EXT:}}
|
2022-04-07 06:48:54 -05:00
|
|
|
volumes:
|
|
|
|
- /var/lib/registry
|
|
|
|
cmd:
|
|
|
|
- serve
|
|
|
|
- /etc/zot/config.json
|