mirror of
https://github.com/project-zot/zot.git
synced 2024-12-30 22:34:13 -05:00
Migrate from docker/build-push-action to stacker-build-push-action
Signed-off-by: Petu Eusebiu <peusebiu@cisco.com>
This commit is contained in:
parent
5e35dfa28f
commit
ad90a4975f
7 changed files with 286 additions and 51 deletions
133
.github/workflows/ci-cd.yml
vendored
133
.github/workflows/ci-cd.yml
vendored
|
@ -86,7 +86,7 @@ jobs:
|
||||||
|
|
||||||
push-image:
|
push-image:
|
||||||
if: github.event_name == 'release' && github.event.action== 'published'
|
if: github.event_name == 'release' && github.event.action== 'published'
|
||||||
name: Push Docker image to GitHub Packages
|
name: Push OCI images to GitHub Packages
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
|
@ -101,66 +101,141 @@ jobs:
|
||||||
registry: ghcr.io
|
registry: ghcr.io
|
||||||
username: ${{ github.actor }}
|
username: ${{ github.actor }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- name: Build zot container image
|
- name: Build and push zot container image
|
||||||
uses: docker/build-push-action@v2
|
uses: project-stacker/stacker-build-push-action@main
|
||||||
with:
|
with:
|
||||||
|
file: 'stacker.yaml'
|
||||||
build-args: |
|
build-args: |
|
||||||
COMMIT=${{ github.event.release.tag_name }}-${{ github.sha }}
|
COMMIT=${{ github.event.release.tag_name }}-${{ github.sha }}
|
||||||
OS=${{ matrix.os }}
|
OS=${{ matrix.os }}
|
||||||
ARCH=${{ matrix.arch }}
|
ARCH=${{ matrix.arch }}
|
||||||
push: true
|
REPO_NAME=zot-${{ matrix.os }}-${{ matrix.arch }}
|
||||||
file: Dockerfile
|
url: docker://ghcr.io/${{ github.repository_owner }}
|
||||||
tags: |
|
tags: ${{ github.event.release.tag_name }} latest
|
||||||
ghcr.io/${{ github.repository }}-${{ matrix.os }}-${{ matrix.arch }}:${{ github.event.release.tag_name }}
|
username: ${{ github.actor }}
|
||||||
ghcr.io/${{ github.repository }}-${{ matrix.os }}-${{ matrix.arch }}:latest
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- name: Build zot-minimal container image
|
- name: Run zot container image with docker
|
||||||
uses: docker/build-push-action@v2
|
run: |
|
||||||
|
if [[ $OS == "linux" && $ARCH == "amd64" ]]; then
|
||||||
|
docker run -d ghcr.io/${{ github.repository_owner }}/zot-${{ matrix.os }}-${{ matrix.arch }}:${{ github.event.release.tag_name }}
|
||||||
|
fi
|
||||||
|
env:
|
||||||
|
OS: ${{ matrix.os }}
|
||||||
|
ARCH: ${{ matrix.arch }}
|
||||||
|
- name: Run zot container image with podman
|
||||||
|
run: |
|
||||||
|
if [[ $OS == "linux" && $ARCH == "amd64" ]]; then
|
||||||
|
podman run -d ghcr.io/${{ github.repository_owner }}/zot-${{ matrix.os }}-${{ matrix.arch }}:${{ github.event.release.tag_name }}
|
||||||
|
fi
|
||||||
|
env:
|
||||||
|
OS: ${{ matrix.os }}
|
||||||
|
ARCH: ${{ matrix.arch }}
|
||||||
|
- name: Build and push zot-minimal container image
|
||||||
|
uses: project-stacker/stacker-build-push-action@main
|
||||||
with:
|
with:
|
||||||
|
file: 'stacker.yaml'
|
||||||
build-args: |
|
build-args: |
|
||||||
COMMIT=${{ github.event.release.tag_name }}-${{ github.sha }}
|
COMMIT=${{ github.event.release.tag_name }}-${{ github.sha }}
|
||||||
OS=${{ matrix.os }}
|
OS=${{ matrix.os }}
|
||||||
ARCH=${{ matrix.arch }}
|
ARCH=${{ matrix.arch }}
|
||||||
push: true
|
EXT=-minimal
|
||||||
file: Dockerfile-minimal
|
REPO_NAME=zot-minimal-${{ matrix.os }}-${{ matrix.arch }}
|
||||||
tags: |
|
url: docker://ghcr.io/${{ github.repository_owner }}
|
||||||
ghcr.io/${{ github.repository }}-minimal-${{ matrix.os }}-${{ matrix.arch }}:${{ github.event.release.tag_name }}
|
tags: ${{ github.event.release.tag_name }} latest
|
||||||
ghcr.io/${{ github.repository }}-minimal-${{ matrix.os }}-${{ matrix.arch }}:latest
|
username: ${{ github.actor }}
|
||||||
- name: Build zot-exporter container image
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
uses: docker/build-push-action@v2
|
- name: Run zot-minimal container image with docker
|
||||||
|
run: |
|
||||||
|
if [[ $OS == "linux" && $ARCH == "amd64" ]]; then
|
||||||
|
docker run -d ghcr.io/${{ github.repository_owner }}/zot-minimal-${{ matrix.os }}-${{ matrix.arch }}:${{ github.event.release.tag_name }}
|
||||||
|
fi
|
||||||
|
env:
|
||||||
|
OS: ${{ matrix.os }}
|
||||||
|
ARCH: ${{ matrix.arch }}
|
||||||
|
- name: Run zot-minimal container image with podman
|
||||||
|
run: |
|
||||||
|
if [[ $OS == "linux" && $ARCH == "amd64" ]]; then
|
||||||
|
podman run -d ghcr.io/${{ github.repository_owner }}/zot-minimal-${{ matrix.os }}-${{ matrix.arch }}:${{ github.event.release.tag_name }}
|
||||||
|
fi
|
||||||
|
env:
|
||||||
|
OS: ${{ matrix.os }}
|
||||||
|
ARCH: ${{ matrix.arch }}
|
||||||
|
- name: Build and push zot-exporter container image
|
||||||
|
uses: project-stacker/stacker-build-push-action@main
|
||||||
with:
|
with:
|
||||||
|
file: 'stacker-zxp.yaml'
|
||||||
build-args: |
|
build-args: |
|
||||||
COMMIT=${{ github.event.release.tag_name }}-${{ github.sha }}
|
COMMIT=${{ github.event.release.tag_name }}-${{ github.sha }}
|
||||||
OS=${{ matrix.os }}
|
OS=${{ matrix.os }}
|
||||||
ARCH=${{ matrix.arch }}
|
ARCH=${{ matrix.arch }}
|
||||||
push: true
|
REPO_NAME=zxp-${{ matrix.os }}-${{ matrix.arch }}
|
||||||
file: Dockerfile-zxp
|
url: docker://ghcr.io/${{ github.repository_owner }}
|
||||||
tags: |
|
tags: ${{ github.event.release.tag_name }} latest
|
||||||
ghcr.io/${{ github.repository }}-zxp-${{ matrix.os }}-${{ matrix.arch }}:${{ github.event.release.tag_name }}
|
username: ${{ github.actor }}
|
||||||
ghcr.io/${{ github.repository }}-zxp-${{ matrix.os }}-${{ matrix.arch }}:latest
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- name: Build zb container image
|
- name: Run zot-exporter container image with docker
|
||||||
uses: docker/build-push-action@v2
|
run: |
|
||||||
|
if [[ $OS == "linux" && $ARCH == "amd64" ]]; then
|
||||||
|
docker run -d ghcr.io/${{ github.repository_owner }}/zxp-${{ matrix.os }}-${{ matrix.arch }}:${{ github.event.release.tag_name }}
|
||||||
|
fi
|
||||||
|
env:
|
||||||
|
OS: ${{ matrix.os }}
|
||||||
|
ARCH: ${{ matrix.arch }}
|
||||||
|
- name: Run zot-exporter container image with podman
|
||||||
|
run: |
|
||||||
|
if [[ $OS == "linux" && $ARCH == "amd64" ]]; then
|
||||||
|
podman run -d ghcr.io/${{ github.repository_owner }}/zxp-${{ matrix.os }}-${{ matrix.arch }}:${{ github.event.release.tag_name }}
|
||||||
|
fi
|
||||||
|
env:
|
||||||
|
OS: ${{ matrix.os }}
|
||||||
|
ARCH: ${{ matrix.arch }}
|
||||||
|
- name: Build and push zb container image
|
||||||
|
uses: project-stacker/stacker-build-push-action@main
|
||||||
with:
|
with:
|
||||||
|
file: 'stacker-zb.yaml'
|
||||||
build-args: |
|
build-args: |
|
||||||
COMMIT=${{ github.event.release.tag_name }}-${{ github.sha }}
|
COMMIT=${{ github.event.release.tag_name }}-${{ github.sha }}
|
||||||
OS=${{ matrix.os }}
|
OS=${{ matrix.os }}
|
||||||
ARCH=${{ matrix.arch }}
|
ARCH=${{ matrix.arch }}
|
||||||
push: true
|
REPO_NAME=zb-${{ matrix.os }}-${{ matrix.arch }}
|
||||||
file: Dockerfile-zb
|
url: docker://ghcr.io/${{ github.repository_owner }}
|
||||||
tags: |
|
tags: ${{ github.event.release.tag_name }} latest
|
||||||
ghcr.io/${{ github.repository }}-zb-${{ matrix.os }}-${{ matrix.arch }}:${{ github.event.release.tag_name }}
|
username: ${{ github.actor }}
|
||||||
ghcr.io/${{ github.repository }}-zb-${{ matrix.os }}-${{ matrix.arch }}:latest
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
- name: Run zb container image with docker
|
||||||
|
run: |
|
||||||
|
if [[ $OS == "linux" && $ARCH == "amd64" ]]; then
|
||||||
|
docker run -d ghcr.io/${{ github.repository_owner }}/zb-${{ matrix.os }}-${{ matrix.arch }}:${{ github.event.release.tag_name }}
|
||||||
|
fi
|
||||||
|
env:
|
||||||
|
OS: ${{ matrix.os }}
|
||||||
|
ARCH: ${{ matrix.arch }}
|
||||||
|
- name: Run zb container image with podman
|
||||||
|
run: |
|
||||||
|
if [[ $OS == "linux" && $ARCH == "amd64" ]]; then
|
||||||
|
podman run -d ghcr.io/${{ github.repository_owner }}/zb-${{ matrix.os }}-${{ matrix.arch }}:${{ github.event.release.tag_name }}
|
||||||
|
fi
|
||||||
|
env:
|
||||||
|
OS: ${{ matrix.os }}
|
||||||
|
ARCH: ${{ matrix.arch }}
|
||||||
- name: Run Trivy vulnerability scanner
|
- name: Run Trivy vulnerability scanner
|
||||||
uses: aquasecurity/trivy-action@master
|
uses: aquasecurity/trivy-action@master
|
||||||
with:
|
with:
|
||||||
image-ref: 'ghcr.io/${{ github.repository }}-${{ matrix.os }}-${{ matrix.arch }}:${{ github.event.release.tag_name }}'
|
image-ref: 'ghcr.io/${{ github.repository }}-${{ matrix.os }}-${{ matrix.arch }}:${{ github.event.release.tag_name }}'
|
||||||
format: 'sarif'
|
format: 'sarif'
|
||||||
output: 'trivy-results.sarif'
|
output: 'trivy-results.sarif'
|
||||||
|
env:
|
||||||
|
TRIVY_USERNAME: ${{ github.actor }}
|
||||||
|
TRIVY_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- name: Run Trivy vulnerability scanner (minimal)
|
- name: Run Trivy vulnerability scanner (minimal)
|
||||||
uses: aquasecurity/trivy-action@master
|
uses: aquasecurity/trivy-action@master
|
||||||
with:
|
with:
|
||||||
image-ref: 'ghcr.io/${{ github.repository }}-minimal-${{ matrix.os }}-${{ matrix.arch }}:${{ github.event.release.tag_name }}'
|
image-ref: 'ghcr.io/${{ github.repository }}-minimal-${{ matrix.os }}-${{ matrix.arch }}:${{ github.event.release.tag_name }}'
|
||||||
format: 'sarif'
|
format: 'sarif'
|
||||||
output: 'trivy-results.sarif'
|
output: 'trivy-results.sarif'
|
||||||
|
env:
|
||||||
|
TRIVY_USERNAME: ${{ github.actor }}
|
||||||
|
TRIVY_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- name: Upload Trivy scan results to GitHub Security tab
|
- name: Upload Trivy scan results to GitHub Security tab
|
||||||
uses: github/codeql-action/upload-sarif@v1
|
uses: github/codeql-action/upload-sarif@v1
|
||||||
with:
|
with:
|
||||||
|
|
24
.github/workflows/oci-conformance-action.yml
vendored
24
.github/workflows/oci-conformance-action.yml
vendored
|
@ -18,25 +18,19 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
# Steps represent a sequence of tasks that will be executed as part of the job
|
||||||
steps:
|
steps:
|
||||||
- name: setup docker
|
- name: Install go 1.17
|
||||||
uses: docker-practice/actions-setup-docker@0.0.1
|
uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
docker_version: 18.09
|
go-version: 1.17.x
|
||||||
docker_channel: stable
|
- name: Checkout this PR
|
||||||
- name: checkout this PR
|
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
- name: Start zot server
|
||||||
ref: ${{ github.event.pull_request.head.sha }}
|
|
||||||
path: zot
|
|
||||||
repository: project-zot/zot
|
|
||||||
- name: start zot server
|
|
||||||
run: |
|
run: |
|
||||||
cd ./zot
|
cd $GITHUB_WORKSPACE
|
||||||
|
make binary
|
||||||
|
RUNNER_TRACKING_ID="" && ./bin/zot-linux-amd64 serve examples/config-conformance.json &
|
||||||
IP=`hostname -I | awk '{print $1}'`
|
IP=`hostname -I | awk '{print $1}'`
|
||||||
echo "SERVER_URL=http://${IP}:5000" >> $GITHUB_ENV
|
echo "SERVER_URL=http://${IP}:8080" >> $GITHUB_ENV
|
||||||
IMAGE_REF="local-zot:v$(date +%Y%m%d%H%M%S)"
|
|
||||||
docker build -f ./Dockerfile-conformance -t "${IMAGE_REF}" .
|
|
||||||
docker run --rm -p 5000:5000 -v "$(pwd)":/go/src/github.com/project-zot/zot -idt "${IMAGE_REF}"
|
|
||||||
- name: Run OCI Distribution Spec conformance tests
|
- name: Run OCI Distribution Spec conformance tests
|
||||||
uses: opencontainers/distribution-spec@main
|
uses: opencontainers/distribution-spec@main
|
||||||
env:
|
env:
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
"dedupe": false
|
"dedupe": false
|
||||||
},
|
},
|
||||||
"http": {
|
"http": {
|
||||||
"address":"127.0.0.1",
|
"address":"0.0.0.0",
|
||||||
"port":"8080"
|
"port":"8080"
|
||||||
},
|
},
|
||||||
"log":{
|
"log":{
|
||||||
|
|
57
stacker-conformance.yaml
Normal file
57
stacker-conformance.yaml
Normal file
|
@ -0,0 +1,57 @@
|
||||||
|
build:
|
||||||
|
from:
|
||||||
|
type: docker
|
||||||
|
url: docker://ghcr.io/project-zot/golang:1.17
|
||||||
|
binds:
|
||||||
|
- . -> /zotcopy
|
||||||
|
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
|
||||||
|
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
|
||||||
|
make COMMIT=${{COMMIT}} OS=${{OS}} ARCH=${{ARCH}} binary
|
||||||
|
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
|
||||||
|
build_only: true
|
||||||
|
|
||||||
|
"${{REPO_NAME:zot}}":
|
||||||
|
from:
|
||||||
|
type: docker
|
||||||
|
url: docker://centos:latest
|
||||||
|
import:
|
||||||
|
- stacker://build/go/src/github.com/project-zot/zot/bin/zot-${{OS}}-${{ARCH}}
|
||||||
|
- stacker://build/go/src/github.com/project-zot/zot/config.json
|
||||||
|
- stacker://build/etc/ssl/certs/ca-certificates.crt
|
||||||
|
run: |
|
||||||
|
cp /stacker/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
||||||
|
cp /stacker/zot-${{OS}}-${{ARCH}} /usr/bin/zot
|
||||||
|
mkdir -p /etc/zot
|
||||||
|
cp /stacker/config.json /etc/zot/config.json
|
||||||
|
entrypoint:
|
||||||
|
- /usr/bin/zot
|
||||||
|
volumes:
|
||||||
|
- /var/lib/registry
|
||||||
|
cmd:
|
||||||
|
- serve
|
||||||
|
- /etc/zot/config.json
|
28
stacker-zb.yaml
Normal file
28
stacker-zb.yaml
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
build:
|
||||||
|
from:
|
||||||
|
type: docker
|
||||||
|
url: docker://ghcr.io/project-zot/golang:1.17
|
||||||
|
binds:
|
||||||
|
- . -> /zotcopy
|
||||||
|
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
|
||||||
|
make COMMIT=${{COMMIT}} OS=${{OS}} ARCH=${{ARCH}} clean bench
|
||||||
|
build_only: true
|
||||||
|
|
||||||
|
"${{REPO_NAME:zb}}":
|
||||||
|
from:
|
||||||
|
type: docker
|
||||||
|
url: docker://centos:latest
|
||||||
|
import:
|
||||||
|
- stacker://build/go/src/github.com/project-zot/zot/bin/zb-${{OS}}-${{ARCH}}
|
||||||
|
run: |
|
||||||
|
cp /stacker/zb-${{OS}}-${{ARCH}} /usr/bin/zb
|
||||||
|
entrypoint:
|
||||||
|
- /usr/bin/zb
|
52
stacker-zxp.yaml
Normal file
52
stacker-zxp.yaml
Normal file
|
@ -0,0 +1,52 @@
|
||||||
|
build:
|
||||||
|
from:
|
||||||
|
type: docker
|
||||||
|
url: docker://ghcr.io/project-zot/golang:1.17
|
||||||
|
binds:
|
||||||
|
- . -> /zotcopy
|
||||||
|
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
|
||||||
|
make COMMIT=${{COMMIT}} OS=${{OS}} ARCH=${{ARCH}} clean exporter-minimal
|
||||||
|
|
||||||
|
cat > config.json << EOF
|
||||||
|
{
|
||||||
|
"Server":{
|
||||||
|
"protocol":"http",
|
||||||
|
"host": "127.0.0.1",
|
||||||
|
"port": "5000"
|
||||||
|
},
|
||||||
|
"Exporter":{
|
||||||
|
"port":"5001",
|
||||||
|
"log":{
|
||||||
|
"level":"debug"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
|
||||||
|
cat config.json
|
||||||
|
build_only: true
|
||||||
|
|
||||||
|
"${{REPO_NAME:zxp}}":
|
||||||
|
from:
|
||||||
|
type: docker
|
||||||
|
url: docker://centos:latest
|
||||||
|
import:
|
||||||
|
- stacker://build/go/src/github.com/project-zot/zot/bin/zxp-${{OS}}-${{ARCH}}
|
||||||
|
- stacker://build/go/src/github.com/project-zot/zot/config.json
|
||||||
|
run: |
|
||||||
|
cp /stacker/zxp-${{OS}}-${{ARCH}} /usr/bin/zxp
|
||||||
|
mkdir -p /etc/zxp
|
||||||
|
cp /stacker/config.json /etc/zxp/config.json
|
||||||
|
entrypoint:
|
||||||
|
- /usr/bin/zxp
|
||||||
|
cmd:
|
||||||
|
- config
|
||||||
|
- /etc/zxp/config.json
|
39
stacker.yaml
39
stacker.yaml
|
@ -3,7 +3,7 @@ build:
|
||||||
type: docker
|
type: docker
|
||||||
url: docker://ghcr.io/project-zot/golang:1.17
|
url: docker://ghcr.io/project-zot/golang:1.17
|
||||||
binds:
|
binds:
|
||||||
- ${{PWD}} -> /zotcopy
|
- . -> /zotcopy
|
||||||
run: |
|
run: |
|
||||||
export GO111MODULE=on
|
export GO111MODULE=on
|
||||||
export GOPATH='/go'
|
export GOPATH='/go'
|
||||||
|
@ -14,14 +14,43 @@ build:
|
||||||
cd /go/src/github.com/project-zot
|
cd /go/src/github.com/project-zot
|
||||||
git clone /zotcopy zot
|
git clone /zotcopy zot
|
||||||
cd /go/src/github.com/project-zot/zot
|
cd /go/src/github.com/project-zot/zot
|
||||||
make binary
|
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
|
||||||
build_only: true
|
build_only: true
|
||||||
|
|
||||||
zot:
|
"${{REPO_NAME:zot}}":
|
||||||
from:
|
from:
|
||||||
type: docker
|
type: docker
|
||||||
url: docker://centos:latest
|
url: docker://centos:latest
|
||||||
import:
|
import:
|
||||||
- ${{PWD}}/bin/zot
|
- 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
|
||||||
run: |
|
run: |
|
||||||
cp /stacker/zot /usr/bin/zot
|
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
|
||||||
|
entrypoint:
|
||||||
|
- /usr/bin/zot
|
||||||
|
volumes:
|
||||||
|
- /var/lib/registry
|
||||||
|
cmd:
|
||||||
|
- serve
|
||||||
|
- /etc/zot/config.json
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue