Dockerfile 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. FROM ubuntu:18.04
  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. netcat \
  20. libaspell-dev \
  21. libhunspell-dev \
  22. hunspell-en-us \
  23. aspell-en \
  24. shellcheck \
  25. && apt-get -y update \
  26. && apt-get -y upgrade \
  27. && apt-get -y autoremove \
  28. && apt-get -y autoclean
  29. ENV GOROOT /usr/local/go
  30. ENV GOPATH /go
  31. ENV PATH ${GOPATH}/bin:${GOROOT}/bin:${PATH}
  32. ENV GO_VERSION REPLACE_ME_GO_VERSION
  33. ENV GO_DOWNLOAD_URL https://storage.googleapis.com/golang
  34. RUN rm -rf ${GOROOT} \
  35. && curl -s ${GO_DOWNLOAD_URL}/go${GO_VERSION}.linux-amd64.tar.gz | tar -v -C /usr/local/ -xz \
  36. && mkdir -p ${GOPATH}/src ${GOPATH}/bin \
  37. && go version
  38. RUN mkdir -p ${GOPATH}/src/go.etcd.io/etcd
  39. WORKDIR ${GOPATH}/src/go.etcd.io/etcd
  40. ADD ./scripts/install-marker.sh /tmp/install-marker.sh
  41. RUN go get -v -u -tags spell github.com/chzchzchz/goword \
  42. && go get -v -u github.com/coreos/license-bill-of-materials \
  43. && go get -v -u github.com/mgechev/revive \
  44. && go get -v -u github.com/mdempsky/unconvert \
  45. && go get -v -u mvdan.cc/unparam \
  46. && go get -v -u honnef.co/go/tools/cmd/staticcheck \
  47. && go get -v -u github.com/gyuho/gocovmerge \
  48. && go get -v -u github.com/gordonklaus/ineffassign \
  49. && go get -v -u github.com/alexkohler/nakedret \
  50. && /tmp/install-marker.sh amd64 \
  51. && rm -f /tmp/install-marker.sh \
  52. && curl -s https://codecov.io/bash >/codecov \
  53. && chmod 700 /codecov