Dockerfile-functional-tester 1.5 KB

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