Dockerfile-functional-tester 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. FROM fedora:28
  2. RUN dnf check-update || true \
  3. && dnf install --assumeyes \
  4. git curl wget mercurial meld gcc gcc-c++ which \
  5. gcc automake autoconf dh-autoreconf libtool libtool-ltdl \
  6. tar unzip gzip \
  7. && dnf check-update || true \
  8. && dnf upgrade --assumeyes || true \
  9. && dnf autoremove --assumeyes || true \
  10. && dnf clean all || true
  11. ENV GOROOT /usr/local/go
  12. ENV GOPATH /go
  13. ENV PATH ${GOPATH}/bin:${GOROOT}/bin:${PATH}
  14. ENV GO_VERSION REPLACE_ME_GO_VERSION
  15. ENV GO_DOWNLOAD_URL https://storage.googleapis.com/golang
  16. RUN rm -rf ${GOROOT} \
  17. && curl -s ${GO_DOWNLOAD_URL}/go${GO_VERSION}.linux-amd64.tar.gz | tar -v -C /usr/local/ -xz \
  18. && mkdir -p ${GOPATH}/src ${GOPATH}/bin \
  19. && go version
  20. RUN mkdir -p ${GOPATH}/src/github.com/coreos/etcd
  21. ADD . ${GOPATH}/src/github.com/coreos/etcd
  22. RUN go get -v github.com/coreos/gofail \
  23. && pushd ${GOPATH}/src/github.com/coreos/etcd \
  24. && GO_BUILD_FLAGS="-v" ./build \
  25. && cp ./bin/etcd /etcd \
  26. && cp ./bin/etcdctl /etcdctl \
  27. && GO_BUILD_FLAGS="-v" FAILPOINTS=1 ./build \
  28. && cp ./bin/etcd /etcd-failpoints \
  29. && ./tools/functional-tester/build \
  30. && cp ./bin/etcd-agent /etcd-agent \
  31. && cp ./bin/etcd-tester /etcd-tester \
  32. && cp ./bin/etcd-runner /etcd-runner \
  33. && go build -v -o /benchmark ./tools/benchmark \
  34. && go build -v -o /etcd-test-proxy ./tools/etcd-test-proxy \
  35. && popd \
  36. && rm -rf ${GOPATH}/src/github.com/coreos/etcd