Skip to content

Commit

Permalink
Merge pull request #817 from tomdee/cleanup-libs
Browse files Browse the repository at this point in the history
Makefile: Stop pulling the unused lib from kube-cross
  • Loading branch information
tomdee authored Sep 18, 2017
2 parents 166e5ef + 10b43f1 commit d4aa342
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
dist/*.tar.gz
dist/flanneld*
dist/libpthread*
dist/ld64*
dist/libc*
dist/*.aci
dist/*.docker
cover.out
Expand Down
11 changes: 2 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,12 @@ update-glide:

clean:
rm -f dist/flanneld*
rm -f dist/libpthread*
rm -f dist/*.aci
rm -f dist/*.docker
rm -f dist/*.tar.gz

## Create a docker image on disk for a specific arch and tag
dist/flanneld-$(TAG)-$(ARCH).docker: dist/flanneld-$(ARCH) dist/iptables-$(ARCH) dist/libpthread.so.0-$(ARCH)
dist/flanneld-$(TAG)-$(ARCH).docker: dist/flanneld-$(ARCH) dist/iptables-$(ARCH)
docker build -f Dockerfile.$(ARCH) -t $(REGISTRY):$(TAG)-$(ARCH) .
docker save -o dist/flanneld-$(TAG)-$(ARCH).docker $(REGISTRY):$(TAG)-$(ARCH)

Expand Down Expand Up @@ -121,12 +120,6 @@ dist/flanneld-$(ARCH):
mv dist/flanneld dist/flanneld-$(ARCH) && \
file dist/flanneld-$(ARCH)'

## Busybox images need updated libs. Pull them out of the kube-cross image
dist/libpthread.so.0-$(ARCH) dist/libc.so.6-$(ARCH) dist/ld64.so.1-$(ARCH):
docker run --rm -v $(CURDIR):/host gcr.io/google_containers/kube-cross:$(KUBE_CROSS_TAG) cp $(LIB_DIR)/libc-2.23.so /host/dist/libc.so.6-$(ARCH)
docker run --rm -v $(CURDIR):/host gcr.io/google_containers/kube-cross:$(KUBE_CROSS_TAG) cp $(LIB_DIR)/ld-2.23.so /host/dist/ld64.so.1-$(ARCH)
docker run --rm -v $(CURDIR):/host gcr.io/google_containers/kube-cross:$(KUBE_CROSS_TAG) cp $(LIB_DIR)/libpthread.so.0 /host/dist/libpthread.so.0-$(ARCH)

## Build an architecture specific iptables binary
dist/iptables-$(ARCH):
docker run -e CC=$(CC) -e GOARM=$(GOARM) -e GOARCH=$(ARCH) \
Expand Down Expand Up @@ -202,7 +195,7 @@ install:
minikube-start:
minikube start --network-plugin cni

minikube-build-image: dist/iptables-amd64 dist/libpthread.so.0-amd64
minikube-build-image: dist/iptables-amd64
CGO_ENABLED=1 go build -v -o dist/flanneld-amd64
# Make sure the minikube docker is being used "eval $(minikube docker-env)"
sh -c 'eval $$(minikube docker-env) && docker build -f Dockerfile.amd64 -t flannel/minikube .'
Expand Down

0 comments on commit d4aa342

Please sign in to comment.