Skip to content

Commit

Permalink
Merge pull request #134 from Thoro/mac-build-environment
Browse files Browse the repository at this point in the history
Add build-image folder, which allows to build kube-router on mac os
  • Loading branch information
murali-reddy committed Aug 20, 2017
2 parents bcb5622 + cb0888b commit 89105e8
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
18 changes: 18 additions & 0 deletions build-image/Dockerfile
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" ]
6 changes: 6 additions & 0 deletions build-image/entrypoint.sh
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 "$@"
4 changes: 4 additions & 0 deletions build-image/make.sh
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

0 comments on commit 89105e8

Please sign in to comment.