This repository was archived by the owner on Jan 21, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 6 files changed +16
-6
lines changed Expand file tree Collapse file tree 6 files changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,9 @@ E2E_TESTS?=true
1414# Source file target
1515SRCS := $(shell find . -type f -name '* .go')
1616
17+ # Set the go build tags here. By default we disable building of libvirt
18+ GO_BUILD_TAGS? =nolibvirt
19+
1720# Allow turning off function inlining and variable registerization
1821ifeq (${DISABLE_OPTIMIZATION},true)
1922 GO_GCFLAGS=-gcflags "-N -l"
8891
8992define binary_target_template
9093build/$(1 ) : $(SRCS )
91- go build -o build/$(1 )$(EXE_EXT ) \
94+ go build -o build/$(1 )$(EXE_EXT ) -tags $( GO_BUILD_TAGS ) \
9295 -ldflags "-X github.com/docker/infrakit/pkg/cli.Version=$(VERSION ) -X github.com/docker/infrakit/pkg/cli.Revision=$(REVISION ) -X github.com/docker/infrakit/pkg/util/docker.ClientVersion=$(DOCKER_CLIENT_VERSION ) " $(2 )
9396endef
9497define define_binary_target
Original file line number Diff line number Diff line change 1+ // +build libvirt
2+
3+ package main
4+
5+ import (
6+ _ "github.com/docker/infrakit/pkg/run/v0/libvirt"
7+ )
Original file line number Diff line number Diff line change @@ -53,7 +53,6 @@ import (
5353 _ "github.com/docker/infrakit/pkg/run/v0/image"
5454 _ "github.com/docker/infrakit/pkg/run/v0/ingress"
5555 _ "github.com/docker/infrakit/pkg/run/v0/kubernetes"
56- _ "github.com/docker/infrakit/pkg/run/v0/libvirt"
5756 _ "github.com/docker/infrakit/pkg/run/v0/maas"
5857 _ "github.com/docker/infrakit/pkg/run/v0/manager"
5958 _ "github.com/docker/infrakit/pkg/run/v0/oracle"
Original file line number Diff line number Diff line change @@ -151,6 +151,8 @@ func Command(plugins func() discovery.Plugins) *cobra.Command {
151151
152152 parsedRules := []launch.Rule {}
153153
154+ log .Info ("config" , "url" , * configURL )
155+
154156 if * configURL != "" {
155157 buff , err := processTemplate (* configURL )
156158 if err != nil {
Original file line number Diff line number Diff line change 11FROM golang:1.8-alpine
22
3- RUN apk add --update git make gcc musl-dev wget ca-certificates openssl libvirt-dev git openssh
3+ RUN apk add --update git make gcc musl-dev wget ca-certificates openssl libvirt-dev libvirt-lxc libvirt-qemu git openssh
44
55ENV GOPATH /go
66ENV PATH /go/bin:$PATH
77
88COPY dockerfiles/build-infrakit /usr/local/bin/
9- COPY dockerfiles/build-hyperkit /usr/local/bin/
109
1110# Add source code
1211Add . /go/src/github.com/docker/infrakit/
Original file line number Diff line number Diff line change 22
33# Installs infrakit by cross compiling locally inside a docker container.
44
5- if [[ " $( which docker) " == " " ] ]; then
5+ if [ " $( which docker) " = " " ]; then
66 echo " You must have Docker locally."
77 exit -1
88fi
@@ -22,5 +22,5 @@ case "$(uname)" in
2222esac
2323
2424
25- docker run --rm -v $dir :/build infrakit/installer build-infrakit $target
25+ docker run --rm -v $dir :/build infrakit/installer:latest build-infrakit $target
2626sudo cp ./infrakit /usr/local/bin
You can’t perform that action at this time.
0 commit comments