diff --git a/example/build-and-load-workload-image.sh b/example/build-and-load-workload-image.sh index 093561e..bc5c3e3 100755 --- a/example/build-and-load-workload-image.sh +++ b/example/build-and-load-workload-image.sh @@ -5,9 +5,10 @@ set -e -o pipefail DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" echo "Building the example workload image..." -docker build "$DIR"/workload -t spiffe-csi-driver-example-workload:example +cd "$DIR"/workload +KO_DOCKER_REPO=ko.local/spiffe-csi-driver-example-workload ko build --bare -t example . echo "Loading example workload image into Kind..." -kind load docker-image spiffe-csi-driver-example-workload:example +kind load docker-image ko.local/spiffe-csi-driver-example-workload:example echo "Done." diff --git a/example/workload/Dockerfile b/example/workload/Dockerfile deleted file mode 100644 index 637c88f..0000000 --- a/example/workload/Dockerfile +++ /dev/null @@ -1,13 +0,0 @@ -FROM golang:1.17-alpine - -WORKDIR /app - -COPY go.mod ./ -COPY go.sum ./ -RUN go mod download - -COPY *.go ./ - -RUN go build -o /workload - -CMD [ "/workload" ]