Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 7 additions & 13 deletions servers/gopls/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,14 @@
FROM alpine:3.15.0
FROM golang:1.18.2-alpine

RUN apk add --no-cache \
go \
shadow \
gcc \
musl-dev \
su-exec \
sudo

ENV GO111MODULE="on"

RUN addgroup -g 1001 gopls \
&& adduser -u 1000 -G gopls -h /home/gopls -D gopls \
&& echo '%gopls ALL=(ALL) NOPASSWD: ALL' > /etc/sudoers.d/gopls

USER gopls

ENV GOBIN="/home/gopls/.bin"
ENV PATH="${GOBIN}:$PATH"

RUN go install github.com/uudashr/gopkgs/v2/cmd/gopkgs@latest \
&& go install github.com/ramya-rao-a/go-outline@latest \
&& go install github.com/cweill/gotests/gotests@latest \
Expand All @@ -27,6 +20,7 @@ RUN go install github.com/uudashr/gopkgs/v2/cmd/gopkgs@latest \
&& go install honnef.co/go/tools/cmd/staticcheck@latest \
&& go install golang.org/x/tools/gopls@latest

COPY docker_entrypoint.sh /home/gopls/docker_entrypoint.sh
ENV GOCACHE /tmp/gocache
ENV GOROOT /usr/local/go

CMD [ "/home/gopls/docker_entrypoint.sh" ]
CMD [ "gopls" ]
11 changes: 0 additions & 11 deletions servers/gopls/docker_entrypoint.sh

This file was deleted.