Upgrade go version in Makefiles to 1.7, use qemu 2.7, armel => armhf and goarm=6 => goarm=7 and use go 1.7.4

This commit is contained in:
Lucas Käldström
2017-01-27 20:04:24 +02:00
parent 04bc44acf9
commit 84006601a0
10 changed files with 28 additions and 21 deletions

View File

@@ -22,13 +22,14 @@ CNI_RELEASE?=07a8a28637e97b22eb8dfe710eeae1344f69d16e
CNI_TARBALL=cni-$(ARCH)-$(CNI_RELEASE).tar.gz
CUR_DIR=$(shell pwd)
OUTPUT_DIR=$(CUR_DIR)/output
GOLANG_VERSION=1.7.4
all: build
build:
mkdir -p $(OUTPUT_DIR)
docker run -it -v $(OUTPUT_DIR):/output golang:1.6 /bin/bash -c "\
docker run -it -v $(OUTPUT_DIR):/output golang:$(GOLANG_VERSION) /bin/bash -c "\
git clone https://github.com/containernetworking/cni\
&& cd cni \
&& git checkout $(CNI_RELEASE) \

View File

@@ -21,7 +21,8 @@ CROSS_BUILD_COPY qemu-ARCH-static /usr/bin/
# All apt-get's must be in one run command or the
# cleanup has no effect.
RUN DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y iptables \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y ebtables \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y conntrack \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y \
iptables \
ebtables \
conntrack \
&& rm -rf /var/lib/apt/lists/*

View File

@@ -16,15 +16,16 @@
REGISTRY?="gcr.io/google_containers"
IMAGE=debian-iptables
TAG=v5
TAG=v6
ARCH?=amd64
TEMP_DIR:=$(shell mktemp -d)
QEMUVERSION=v2.7.0
ifeq ($(ARCH),amd64)
BASEIMAGE?=debian:jessie
endif
ifeq ($(ARCH),arm)
BASEIMAGE?=armel/debian:jessie
BASEIMAGE?=armhf/debian:jessie
QEMUARCH=arm
endif
ifeq ($(ARCH),arm64)
@@ -52,7 +53,7 @@ else
# When cross-building, only the placeholder "CROSS_BUILD_" should be removed
# Register /usr/bin/qemu-ARCH-static as the handler for ARM binaries in the kernel
docker run --rm --privileged multiarch/qemu-user-static:register --reset
curl -sSL https://github.com/multiarch/qemu-user-static/releases/download/v2.6.0/x86_64_qemu-$(QEMUARCH)-static.tar.gz | tar -xz -C $(TEMP_DIR)
curl -sSL https://github.com/multiarch/qemu-user-static/releases/download/$(QEMUVERSION)/x86_64_qemu-$(QEMUARCH)-static.tar.gz | tar -xz -C $(TEMP_DIR)
cd $(TEMP_DIR) && sed -i "s/CROSS_BUILD_//g" Dockerfile
endif