Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add changes to support multiple platform build #286

Merged
merged 1 commit into from
Jan 15, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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