drone-kaniko/scripts/docker.sh

25 lines
632 B
Bash
Raw Normal View History

2020-11-19 20:27:09 +01:00
#!/bin/sh
# force go modules
export GOPATH=""
# disable cgo
export CGO_ENABLED=0
# force linux amd64 platform
export GOOS=linux
export GOARCH=amd64
set -e
set -x
# build the binary
2020-11-26 07:15:10 +01:00
go build -o release/linux/amd64/kaniko-gcr ./cmd/kaniko-gcr
go build -o release/linux/amd64/kaniko-ecr ./cmd/kaniko-ecr
go build -o release/linux/amd64/kaniko-docker ./cmd/kaniko-docker
2020-11-19 20:27:09 +01:00
# build the docker image
docker build -f docker/gcr/Dockerfile.linux.amd64 -t plugins/kaniko-gcr .
docker build -f docker/ecr/Dockerfile.linux.amd64 -t plugins/kaniko-ecr .
docker build -f docker/docker/Dockerfile.linux.amd64 -t plugins/kaniko .