Skip to content

Commit

Permalink
Add changes to support multiple platform build
Browse files Browse the repository at this point in the history
arm64 and amd64 so far
  • Loading branch information
mbartsch committed Dec 15, 2018
1 parent 87052b1 commit 33c4c18
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,20 @@
VERSION ?= $(shell git describe --tags --always --dirty)
LDFLAGS ?= -X main.version=$(VERSION)

ARCH ?= $(shell uname -m)

ifeq ($(ARCH),aarch64)
ARCH = arm64
else ($(ARCH),x86_64)
ARCH = amd64
endif

# Download portmap plugin
download-portmap:
mkdir -p tmp/downloads
mkdir -p tmp/plugins
curl -L -o tmp/downloads/cni-plugins-amd64.tgz https://github.com/containernetworking/plugins/releases/download/v0.6.0/cni-plugins-amd64-v0.6.0.tgz
tar -vxf tmp/downloads/cni-plugins-amd64.tgz -C tmp/plugins
curl -L -o tmp/downloads/cni-plugins-$(ARCH).tgz https://github.com/containernetworking/plugins/releases/download/v0.6.0/cni-plugins-$(ARCH)-v0.6.0.tgz
tar -vxf tmp/downloads/cni-plugins-$(ARCH).tgz -C tmp/plugins
cp tmp/plugins/portmap .
rm -rf tmp

Expand Down

0 comments on commit 33c4c18

Please sign in to comment.