k3s/cluster/images/hyperkube/Makefile

28 lines
1.0 KiB
Makefile
Raw Normal View History

# build the hyperkube image.
VERSION=v1.1.2
ARCH=amd64
BASEIMAGE=debian:jessie
## Comment in for arm builds, must be run on an arm machine
# ARCH=arm
# need to escape '/' for the regexp below
# BASEIMAGE=armbuild\\/debian:jessie
all:
cp ../../saltbase/salt/helpers/safe_format_and_mount .
2015-11-13 20:03:15 +00:00
cp ../../saltbase/salt/generate-cert/make-ca-cert.sh .
curl -O https://storage.googleapis.com/kubernetes-release/release/${VERSION}/bin/linux/${ARCH}/hyperkube
2015-06-15 02:38:50 +00:00
sed -i "s/VERSION/${VERSION}/g" master-multi.json master.json
sed -i "s/ARCH/${ARCH}/g" master-multi.json master.json
sed -i "s/BASEIMAGE/${BASEIMAGE}/g" Dockerfile
docker build -t gcr.io/google_containers/hyperkube-${ARCH}:${VERSION} .
gcloud docker push gcr.io/google_containers/hyperkube-${ARCH}:${VERSION}
# Backward compatability. TODO: deprecate this image tag
ifeq ($(ARCH),amd64)
docker tag gcr.io/google_containers/hyperkube-${ARCH}:${VERSION} gcr.io/google_containers/hyperkube:${VERSION}
gcloud docker push gcr.io/google_containers/hyperkube:${VERSION}
endif
.PHONY: all