-
Notifications
You must be signed in to change notification settings - Fork 469
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add build-image folder, which allows to build kube-router on mac os
- Loading branch information
Showing
3 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
from centos:7 | ||
|
||
RUN yum -y install git make | ||
|
||
ENV GO_VERSION 1.8.3 | ||
ENV GO_OS linux | ||
ENV GO_ARCH amd64 | ||
|
||
RUN curl -O -L https://storage.googleapis.com/golang/go$GO_VERSION.$GO_OS-$GO_ARCH.tar.gz && \ | ||
tar -C /usr/local -xzf go$GO_VERSION.$GO_OS-$GO_ARCH.tar.gz && \ | ||
mkdir -p /data/go && \ | ||
export GOPATH=/data/go | ||
|
||
COPY entrypoint.sh /bin/ | ||
|
||
VOLUME [ "/data/go" ] | ||
|
||
ENTRYPOINT [ "entrypoint.sh" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#! /bin/bash | ||
|
||
export GOPATH=/data/go | ||
export PATH=$PATH:/usr/local/go/bin | ||
cd /data/go/src/github.com/cloudnativelabs/kube-router | ||
make "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
NAME=kube-router-build | ||
docker build -t kube-router-build:latest . | ||
docker rm -f $NAME | ||
docker run --name=$NAME -v $GOPATH:/data/go kube-router-build:latest |