You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
428 B

  1. FROM golang:latest
  2. ENV SHELL /bin/bash
  3. ENV HOME /root
  4. WORKDIR $HOME
  5. COPY . /go/src/golang.org/x/tools/cmd/getgo
  6. RUN ( \
  7. cd /go/src/golang.org/x/tools/cmd/getgo \
  8. && go build \
  9. && mv getgo /usr/local/bin/getgo \
  10. )
  11. # undo the adding of GOPATH to env for testing
  12. ENV PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
  13. ENV GOPATH ""
  14. # delete /go and /usr/local/go for testing
  15. RUN rm -rf /go /usr/local/go