blob: cfd8086757038c26c74658055cebaaa742a41cfe [file] [log] [blame]
khenaidooffe076b2019-01-15 16:08:08 -05001FROM ubuntu:17.10
2
3RUN rm /bin/sh && ln -s /bin/bash /bin/sh
4RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
5
6RUN 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
26ENV GOROOT /usr/local/go
27ENV GOPATH /go
28ENV PATH ${GOPATH}/bin:${GOROOT}/bin:${PATH}
29ENV GO_VERSION REPLACE_ME_GO_VERSION
30ENV GO_DOWNLOAD_URL https://storage.googleapis.com/golang
31RUN 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
36RUN mkdir -p ${GOPATH}/src/github.com/coreos/etcd
37ADD . ${GOPATH}/src/github.com/coreos/etcd
38
39RUN 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