Dockerfile 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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/go.etcd.io/etcd
  21. ADD . ${GOPATH}/src/go.etcd.io/etcd
  22. ADD ./functional.yaml /functional.yaml
  23. RUN go get -v go.etcd.io/gofail \
  24. && pushd ${GOPATH}/src/go.etcd.io/etcd \
  25. && GO_BUILD_FLAGS="-v" ./build \
  26. && mkdir -p /bin \
  27. && cp ./bin/etcd /bin/etcd \
  28. && cp ./bin/etcdctl /bin/etcdctl \
  29. && GO_BUILD_FLAGS="-v" FAILPOINTS=1 ./build \
  30. && cp ./bin/etcd /bin/etcd-failpoints \
  31. && ./functional/build \
  32. && cp ./bin/etcd-agent /bin/etcd-agent \
  33. && cp ./bin/etcd-proxy /bin/etcd-proxy \
  34. && cp ./bin/etcd-runner /bin/etcd-runner \
  35. && cp ./bin/etcd-tester /bin/etcd-tester \
  36. && go build -v -o /bin/benchmark ./tools/benchmark \
  37. && popd \
  38. && rm -rf ${GOPATH}/src/go.etcd.io/etcd