khenaidoo | ffe076b | 2019-01-15 16:08:08 -0500 | [diff] [blame^] | 1 | FROM ubuntu:17.10 |
| 2 | |
| 3 | RUN rm /bin/sh && ln -s /bin/bash /bin/sh |
| 4 | RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections |
| 5 | |
| 6 | RUN apt-get -y update \ |
| 7 | && apt-get -y install \ |
| 8 | build-essential \ |
| 9 | gcc \ |
| 10 | apt-utils \ |
| 11 | pkg-config \ |
| 12 | software-properties-common \ |
| 13 | apt-transport-https \ |
| 14 | libssl-dev \ |
| 15 | sudo \ |
| 16 | bash \ |
| 17 | curl \ |
| 18 | wget \ |
| 19 | tar \ |
| 20 | git \ |
| 21 | && apt-get -y update \ |
| 22 | && apt-get -y upgrade \ |
| 23 | && apt-get -y autoremove \ |
| 24 | && apt-get -y autoclean |
| 25 | |
| 26 | ENV GOROOT /usr/local/go |
| 27 | ENV GOPATH /go |
| 28 | ENV PATH ${GOPATH}/bin:${GOROOT}/bin:${PATH} |
| 29 | ENV GO_VERSION REPLACE_ME_GO_VERSION |
| 30 | ENV GO_DOWNLOAD_URL https://storage.googleapis.com/golang |
| 31 | RUN rm -rf ${GOROOT} \ |
| 32 | && curl -s ${GO_DOWNLOAD_URL}/go${GO_VERSION}.linux-amd64.tar.gz | tar -v -C /usr/local/ -xz \ |
| 33 | && mkdir -p ${GOPATH}/src ${GOPATH}/bin \ |
| 34 | && go version |
| 35 | |
| 36 | RUN mkdir -p ${GOPATH}/src/github.com/coreos/etcd |
| 37 | ADD . ${GOPATH}/src/github.com/coreos/etcd |
| 38 | |
| 39 | RUN go get -v github.com/coreos/gofail \ |
| 40 | && pushd ${GOPATH}/src/github.com/coreos/etcd \ |
| 41 | && GO_BUILD_FLAGS="-v" ./build \ |
| 42 | && cp ./bin/etcd /etcd \ |
| 43 | && cp ./bin/etcdctl /etcdctl \ |
| 44 | && GO_BUILD_FLAGS="-v" FAILPOINTS=1 ./build \ |
| 45 | && cp ./bin/etcd /etcd-failpoints \ |
| 46 | && ./tools/functional-tester/build \ |
| 47 | && cp ./bin/etcd-agent /etcd-agent \ |
| 48 | && cp ./bin/etcd-tester /etcd-tester \ |
| 49 | && cp ./bin/etcd-runner /etcd-runner \ |
| 50 | && go build -v -o /benchmark ./cmd/tools/benchmark \ |
| 51 | && go build -v -o /etcd-test-proxy ./cmd/tools/etcd-test-proxy \ |
| 52 | && popd \ |
| 53 | && rm -rf ${GOPATH}/src/github.com/coreos/etcd |