Last active
October 21, 2020 04:18
-
-
Save ramkumarrammohan/12bac28d50af65c7670ae4b01260335f to your computer and use it in GitHub Desktop.
Go lang docker with vscode support
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM golang:1.15 | |
# Configure to reduce warnings and limitations as instruction from official VSCode Remote-Containers. | |
# See https://code.visualstudio.com/docs/remote/containers-advanced#_reducing-dockerfile-build-warnings. | |
ENV DEBIAN_FRONTEND=noninteractive | |
RUN apt-get update \ | |
&& apt-get -y install --no-install-recommends apt-utils 2>&1 | |
# Verify git, process tools, lsb-release (common in install instructions for CLIs) installed. | |
RUN apt-get -y install git gitk iproute2 procps lsb-release | |
RUN apt-get update | |
# Install gocode-gomod. | |
RUN go get -x -d github.com/stamblerre/gocode 2>&1 \ | |
&& go build -o gocode-gomod github.com/stamblerre/gocode \ | |
&& mv gocode-gomod $GOPATH/bin/ | |
# Install other tools. | |
RUN go get -u -v github.com/mdempsky/gocode | |
RUN go get -u -v github.com/uudashr/gopkgs/cmd/gopkgs | |
RUN go get -u -v github.com/ramya-rao-a/go-outline | |
RUN go get -u -v github.com/acroca/go-symbols | |
RUN go get -u -v golang.org/x/tools/cmd/guru | |
RUN go get -u -v golang.org/x/tools/cmd/gorename | |
RUN go get -u -v github.com/go-delve/delve/cmd/dlv | |
RUN go get -u -v github.com/stamblerre/gocode | |
RUN go get -u -v github.com/rogpeppe/godef | |
RUN go get -u -v golang.org/x/tools/cmd/goimports | |
RUN go get -u -v golang.org/x/tools/gopls | |
RUN go get -u -v golang.org/x/lint/golint | |
# Clean up. | |
RUN apt-get autoremove -y \ | |
&& apt-get clean -y \ | |
&& rm -rf /var/lib/apt/lists/* | |
# Revert workaround at top layer. | |
ENV DEBIAN_FRONTEND=dialog | |
# Expose service ports. | |
EXPOSE 8000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment