File tree Expand file tree Collapse file tree 7 files changed +122
-0
lines changed Expand file tree Collapse file tree 7 files changed +122
-0
lines changed Original file line number Diff line number Diff line change 11cmd /docker-machine-driver-kvm /docker-machine-driver-kvm
22* .sw *
3+ docker-machine-driver-kvm- *
Original file line number Diff line number Diff line change 1+ FROM alpine:3.4
2+
3+ MAINTAINER Daniel Hiltgen <
[email protected] >
4+
5+ ARG MACHINE_VERSION
6+ ENV GOPATH /go
7+
8+ RUN apk -v add --update libvirt-dev curl go git musl-dev gcc
9+ RUN git clone --branch ${MACHINE_VERSION} https://github.com/docker/machine.git /go/src/github.com/docker/machine
10+
11+ COPY . /go/src/github.com/dhiltgen/docker-machine-kvm
12+ WORKDIR /go/src/github.com/dhiltgen/docker-machine-kvm
13+ RUN go get -v -d ./...
14+
15+ RUN go install -v ./cmd/docker-machine-driver-kvm
Original file line number Diff line number Diff line change 1+ FROM alpine:3.5
2+
3+ MAINTAINER Daniel Hiltgen <
[email protected] >
4+
5+ ARG MACHINE_VERSION
6+ ENV GOPATH /go
7+
8+ RUN apk -v add --update libvirt-dev curl go git musl-dev gcc
9+ RUN git clone --branch ${MACHINE_VERSION} https://github.com/docker/machine.git /go/src/github.com/docker/machine
10+
11+ COPY . /go/src/github.com/dhiltgen/docker-machine-kvm
12+ WORKDIR /go/src/github.com/dhiltgen/docker-machine-kvm
13+ RUN go get -v -d ./...
14+
15+ RUN go install -v ./cmd/docker-machine-driver-kvm
Original file line number Diff line number Diff line change 1+ FROM centos:7
2+
3+ MAINTAINER Daniel Hiltgen <
[email protected] >
4+
5+ ARG MACHINE_VERSION
6+ ARG GO_VERSION
7+ ENV GOPATH /go
8+
9+ RUN yum install -y libvirt-devel curl git gcc
10+ RUN curl -sSL https://storage.googleapis.com/golang/go${GO_VERSION}.linux-amd64.tar.gz | tar -C /usr/local -xzf -
11+ ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/go/bin:/go/bin
12+ RUN git clone --branch ${MACHINE_VERSION} https://github.com/docker/machine.git /go/src/github.com/docker/machine
13+
14+ COPY . /go/src/github.com/dhiltgen/docker-machine-kvm
15+ WORKDIR /go/src/github.com/dhiltgen/docker-machine-kvm
16+ RUN go get -v -d ./...
17+
18+ RUN go install -v ./cmd/docker-machine-driver-kvm
Original file line number Diff line number Diff line change 1+ FROM ubuntu:14.04
2+
3+ MAINTAINER Daniel Hiltgen <
[email protected] >
4+
5+ ARG MACHINE_VERSION
6+ ARG GO_VERSION
7+ ENV GOPATH /go
8+
9+ RUN apt-get update && apt-get install -y libvirt-dev curl git gcc
10+ RUN curl -sSL https://storage.googleapis.com/golang/go${GO_VERSION}.linux-amd64.tar.gz | tar -C /usr/local -xzf -
11+ ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/go/bin:/go/bin
12+ RUN git clone --branch ${MACHINE_VERSION} https://github.com/docker/machine.git /go/src/github.com/docker/machine
13+
14+ COPY . /go/src/github.com/dhiltgen/docker-machine-kvm
15+ WORKDIR /go/src/github.com/dhiltgen/docker-machine-kvm
16+ RUN go get -v -d ./...
17+
18+ RUN go install -v ./cmd/docker-machine-driver-kvm
Original file line number Diff line number Diff line change 1+ FROM ubuntu:16.04
2+
3+ MAINTAINER Daniel Hiltgen <
[email protected] >
4+
5+ ARG MACHINE_VERSION
6+ ARG GO_VERSION
7+ ENV GOPATH /go
8+
9+ RUN apt-get update && apt-get install -y libvirt-dev curl git gcc
10+ RUN curl -sSL https://storage.googleapis.com/golang/go${GO_VERSION}.linux-amd64.tar.gz | tar -C /usr/local -xzf -
11+ ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/go/bin:/go/bin
12+ RUN git clone --branch ${MACHINE_VERSION} https://github.com/docker/machine.git /go/src/github.com/docker/machine
13+
14+ COPY . /go/src/github.com/dhiltgen/docker-machine-kvm
15+ WORKDIR /go/src/github.com/dhiltgen/docker-machine-kvm
16+ RUN go get -v -d ./...
17+
18+ RUN go install -v ./cmd/docker-machine-driver-kvm
Original file line number Diff line number Diff line change 1+ PREFIX =docker-machine-driver-kvm
2+ MACHINE_VERSION =v0.10.0
3+ GO_VERSION =1.8.1
4+ DESCRIBE =$(shell git describe --tags)
5+
6+ TARGETS =$(addprefix $(PREFIX ) -, alpine3.4 alpine3.5 ubuntu14.04 ubuntu16.04 centos7)
7+
8+ build : $(TARGETS )
9+
10+ $(PREFIX ) -% : Dockerfile.%
11+ docker rmi -f $@ > /dev/null 2>&1 || true
12+ docker rm -f $@ -extract > /dev/null 2>&1 || true
13+ echo " Building binaries for $@ "
14+ docker build --build-arg " MACHINE_VERSION=$( MACHINE_VERSION) " --build-arg " GO_VERSION=$( GO_VERSION) " -t $@ -f $< .
15+ docker create --name $@ -extract $@ sh
16+ docker cp $@ -extract:/go/bin/docker-machine-driver-kvm ./
17+ mv ./docker-machine-driver-kvm ./$@
18+ docker rm $@ -extract || true
19+ docker rmi $@ || true
20+
21+ clean :
22+ rm -f ./$(PREFIX ) -*
23+
24+
25+ release : build
26+ @echo " Paste the following into the release page on github and upload the binaries..."
27+ @echo " "
28+ @for bin in $(PREFIX ) -* ; do \
29+ target=$$(echo $${bin} | cut -f5- -d- ) ; \
30+ md5=$$(md5sum $${bin} ) ; \
31+ echo " * $$ {target} - md5: $$ {md5}" ; \
32+ echo ' ```' ; \
33+ echo " curl -L https://github.com/dhiltgen/docker-machine-kvm/releases/download/$( DESCRIBE) /$$ {bin} > /usr/local/bin/$( PREFIX) \\ " ; \
34+ echo " chmod +x /usr/local/bin/$( PREFIX) " ; \
35+ echo ' ```' ; \
36+ done
37+
You can’t perform that action at this time.
0 commit comments