Skip to content

Commit

Permalink
Merge pull request #286 from mbartsch/multiplatform
Browse files Browse the repository at this point in the history
Add changes to support multiple platform build
  • Loading branch information
mogren authored Jan 15, 2019
2 parents 75e26e6 + 33c4c18 commit 92980a5
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:/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:/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 92980a5

Please sign in to comment.