Install gopls, other tools using modules where possible
This commit is contained in:
@@ -23,36 +23,42 @@ RUN apt-get update \
|
|||||||
# Verify git, process tools, lsb-release (common in install instructions for CLIs) installed
|
# Verify git, process tools, lsb-release (common in install instructions for CLIs) installed
|
||||||
&& apt-get -y install git iproute2 procps lsb-release \
|
&& apt-get -y install git iproute2 procps lsb-release \
|
||||||
#
|
#
|
||||||
|
# Install Go tools w/module support
|
||||||
|
&& mkdir -p /tmp/gotools \
|
||||||
|
&& cd /tmp/gotools \
|
||||||
|
&& GO111MODULE=on go get -v golang.org/x/tools/gopls@latest 2>&1 \
|
||||||
|
&& GO111MODULE=on go get -v \
|
||||||
|
honnef.co/go/tools/...@latest \
|
||||||
|
golang.org/x/tools/cmd/gorename@latest \
|
||||||
|
golang.org/x/tools/cmd/goimports@latest \
|
||||||
|
golang.org/x/tools/cmd/guru@latest \
|
||||||
|
golang.org/x/lint/golint@latest \
|
||||||
|
github.com/mdempsky/gocode@latest \
|
||||||
|
github.com/cweill/gotests/...@latest \
|
||||||
|
github.com/haya14busa/goplay/cmd/goplay@latest \
|
||||||
|
github.com/sqs/goreturns@latest \
|
||||||
|
github.com/josharian/impl@latest \
|
||||||
|
github.com/davidrjenni/reftools/cmd/fillstruct@latest \
|
||||||
|
github.com/uudashr/gopkgs/cmd/gopkgs@latest \
|
||||||
|
github.com/ramya-rao-a/go-outline@latest \
|
||||||
|
github.com/acroca/go-symbols@latest \
|
||||||
|
github.com/godoctor/godoctor@latest \
|
||||||
|
github.com/rogpeppe/godef@latest \
|
||||||
|
github.com/zmb3/gogetdoc@latest \
|
||||||
|
github.com/fatih/gomodifytags@latest \
|
||||||
|
github.com/mgechev/revive@latest \
|
||||||
|
github.com/go-delve/delve/cmd/dlv@latest 2>&1 \
|
||||||
|
#
|
||||||
|
# Install Go tools w/o module support
|
||||||
|
&& go get -v github.com/alecthomas/gometalinter 2>&1 \
|
||||||
|
#
|
||||||
# Install gocode-gomod
|
# Install gocode-gomod
|
||||||
&& go get -x -d github.com/stamblerre/gocode 2>&1 \
|
&& go get -x -d github.com/stamblerre/gocode 2>&1 \
|
||||||
&& go build -o gocode-gomod github.com/stamblerre/gocode \
|
&& go build -o gocode-gomod github.com/stamblerre/gocode \
|
||||||
&& mv gocode-gomod $GOPATH/bin/ \
|
&& mv gocode-gomod $GOPATH/bin/ \
|
||||||
#
|
#
|
||||||
# Install Go tools
|
# Install golangci-lint
|
||||||
&& go get -u -v \
|
&& curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin 2>&1 \
|
||||||
github.com/mdempsky/gocode \
|
|
||||||
github.com/uudashr/gopkgs/cmd/gopkgs \
|
|
||||||
github.com/ramya-rao-a/go-outline \
|
|
||||||
github.com/acroca/go-symbols \
|
|
||||||
github.com/godoctor/godoctor \
|
|
||||||
golang.org/x/tools/cmd/guru \
|
|
||||||
golang.org/x/tools/cmd/gorename \
|
|
||||||
github.com/rogpeppe/godef \
|
|
||||||
github.com/zmb3/gogetdoc \
|
|
||||||
github.com/haya14busa/goplay/cmd/goplay \
|
|
||||||
github.com/sqs/goreturns \
|
|
||||||
github.com/josharian/impl \
|
|
||||||
github.com/davidrjenni/reftools/cmd/fillstruct \
|
|
||||||
github.com/fatih/gomodifytags \
|
|
||||||
github.com/cweill/gotests/... \
|
|
||||||
golang.org/x/tools/cmd/goimports \
|
|
||||||
golang.org/x/lint/golint \
|
|
||||||
golang.org/x/tools/gopls \
|
|
||||||
github.com/alecthomas/gometalinter \
|
|
||||||
honnef.co/go/tools/... \
|
|
||||||
github.com/golangci/golangci-lint/cmd/golangci-lint \
|
|
||||||
github.com/mgechev/revive \
|
|
||||||
github.com/derekparker/delve/cmd/dlv 2>&1 \
|
|
||||||
#
|
#
|
||||||
# Create a non-root user to use if preferred - see https://aka.ms/vscode-remote/containers/non-root-user.
|
# Create a non-root user to use if preferred - see https://aka.ms/vscode-remote/containers/non-root-user.
|
||||||
&& groupadd --gid $USER_GID $USERNAME \
|
&& groupadd --gid $USER_GID $USERNAME \
|
||||||
@@ -65,7 +71,11 @@ RUN apt-get update \
|
|||||||
# Clean up
|
# Clean up
|
||||||
&& apt-get autoremove -y \
|
&& apt-get autoremove -y \
|
||||||
&& apt-get clean -y \
|
&& apt-get clean -y \
|
||||||
&& rm -rf /var/lib/apt/lists/* /go/src
|
&& rm -rf /var/lib/apt/lists/* /go/src /tmp/gotools
|
||||||
|
|
||||||
|
# Update this to "on" or "off" as appropriate
|
||||||
|
ENV GO111MODULE=auto
|
||||||
|
|
||||||
# Switch back to dialog for any ad-hoc use of apt-get
|
# Switch back to dialog for any ad-hoc use of apt-get
|
||||||
ENV DEBIAN_FRONTEND=dialog
|
ENV DEBIAN_FRONTEND=dialog
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user