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
14
14
# Source file target
15
15
SRCS := $(shell find . -type f -name '* .go')
16
16
17
+ # Set the go build tags here. By default we disable building of libvirt
18
+ GO_BUILD_TAGS? =nolibvirt
19
+
17
20
# Allow turning off function inlining and variable registerization
18
21
ifeq (${DISABLE_OPTIMIZATION},true)
19
22
GO_GCFLAGS=-gcflags "-N -l"
88
91
89
92
define binary_target_template
90
93
build/$(1 ) : $(SRCS )
91
- go build -o build/$(1 )$(EXE_EXT ) \
94
+ go build -o build/$(1 )$(EXE_EXT ) -tags $( GO_BUILD_TAGS ) \
92
95
-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 )
93
96
endef
94
97
define 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 (
53
53
_ "github.com/docker/infrakit/pkg/run/v0/image"
54
54
_ "github.com/docker/infrakit/pkg/run/v0/ingress"
55
55
_ "github.com/docker/infrakit/pkg/run/v0/kubernetes"
56
- _ "github.com/docker/infrakit/pkg/run/v0/libvirt"
57
56
_ "github.com/docker/infrakit/pkg/run/v0/maas"
58
57
_ "github.com/docker/infrakit/pkg/run/v0/manager"
59
58
_ "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 {
151
151
152
152
parsedRules := []launch.Rule {}
153
153
154
+ log .Info ("config" , "url" , * configURL )
155
+
154
156
if * configURL != "" {
155
157
buff , err := processTemplate (* configURL )
156
158
if err != nil {
Original file line number Diff line number Diff line change 1
1
FROM golang:1.8-alpine
2
2
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
4
4
5
5
ENV GOPATH /go
6
6
ENV PATH /go/bin:$PATH
7
7
8
8
COPY dockerfiles/build-infrakit /usr/local/bin/
9
- COPY dockerfiles/build-hyperkit /usr/local/bin/
10
9
11
10
# Add source code
12
11
Add . /go/src/github.com/docker/infrakit/
Original file line number Diff line number Diff line change 2
2
3
3
# Installs infrakit by cross compiling locally inside a docker container.
4
4
5
- if [[ " $( which docker) " == " " ] ]; then
5
+ if [ " $( which docker) " = " " ]; then
6
6
echo " You must have Docker locally."
7
7
exit -1
8
8
fi
@@ -22,5 +22,5 @@ case "$(uname)" in
22
22
esac
23
23
24
24
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
26
26
sudo cp ./infrakit /usr/local/bin
You can’t perform that action at this time.
0 commit comments