From 6510a6d6b3fcc5b72299ddbd55f2deb512f7d145 Mon Sep 17 00:00:00 2001 From: Brad Jenkins Date: Sun, 24 Sep 2017 02:45:24 +0000 Subject: [PATCH] Work around compile error in deprecated project not acceping patches --- Dockerfile | 7 ++++++- Dockerfile.dev | 5 +++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index c3dc69c45..0e13d3b01 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,8 +4,13 @@ ENTRYPOINT ["/bin/registrator"] COPY . /go/src/github.com/gliderlabs/registrator RUN apk --no-cache add -t build-deps build-base go git \ && apk --no-cache add ca-certificates \ - && cd /go/src/github.com/gliderlabs/registrator \ && export GOPATH=/go \ + && go get -u github.com/ugorji/go/codec/codecgen \ + && mkdir /go/src/github.com/coreos \ + && git clone https://github.com/coreos/go-etcd.git /go/src/github.com/coreos/go-etcd \ + && cd /go/src/github.com/coreos/go-etcd/etcd \ + && /go/bin/codecgen -d 1978 -o response.generated.go response.go \ + && cd /go/src/github.com/gliderlabs/registrator \ && git config --global http.https://gopkg.in.followRedirects true \ && go get \ && go build -ldflags "-X main.Version=$(cat VERSION)" -o /bin/registrator \ diff --git a/Dockerfile.dev b/Dockerfile.dev index 0584cd232..93caa2273 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -5,6 +5,11 @@ ENV GOPATH /go RUN apk --no-cache add build-base go git ca-certificates COPY . /go/src/github.com/gliderlabs/registrator RUN cd /go/src/github.com/gliderlabs/registrator \ + && go get -u github.com/ugorji/go/codec/codecgen \ + && mkdir /go/src/github.com/coreos \ + && git clone https://github.com/coreos/go-etcd.git /go/src/github.com/coreos/go-etcd \ + && cd /go/src/github.com/coreos/go-etcd/etcd \ + && /go/bin/codecgen -d 1978 -o response.generated.go response.go \ && git config --global http.https://gopkg.in.followRedirects true \ && go get \ && go build -ldflags "-X main.Version=dev" -o /bin/registrator