github.com/powerman/golang-tools@v0.1.11-0.20220410185822-5ad214d8d803/cmd/getgo/Dockerfile (about)

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