alnoda-workspaces/workspaces/go-workspace/Dockerfile

28 lines
1.1 KiB
Docker
Raw Normal View History

2023-07-06 03:36:02 +12:00
FROM alnoda/codeserver-workspace:5.0
2022-05-14 18:14:55 +12:00
2023-07-06 03:36:02 +12:00
RUN wrk install go==1.18.2
2022-05-14 18:14:55 +12:00
2023-07-06 03:36:02 +12:00
# Set global environmental variables
2022-05-14 18:14:55 +12:00
ENV PATH="$PATH:/home/abc/go/bin"
2022-09-17 20:23:45 +12:00
ENV GOPATH="/home/abc/go"
2022-10-31 07:02:12 +13:00
ENV GOROOT="/home/abc/go"
2022-05-14 18:14:55 +12:00
2023-07-06 03:36:02 +12:00
# Istall extra Go tools
2022-09-17 20:23:45 +12:00
RUN go install -v github.com/ramya-rao-a/go-outline@latest \
2022-10-31 07:02:12 +13:00
&& go install -v golang.org/x/tools/gopls@latest \
2023-07-06 03:36:02 +12:00
&& go install -v golang.org/x/tools/cmd/goimports@latest \
&& go install -v github.com/uudashr/gopkgs/v2/cmd/gopkgs@latest \
&& go install -v github.com/stamblerre/gocode@latest
2022-09-17 20:23:45 +12:00
# Install additional codeserver extensions
RUN echo "------------------------------------------------------ extensions" \
2022-10-31 07:02:12 +13:00
&& code-server --install-extension ms-vscode.Go \
&& code-server --install-extension tonsky.theme-alabaster \
&& code-server --install-extension CoenraadS.bracket-pair-colorizer-2
2022-09-17 20:23:45 +12:00
# Change default codeserver theme
COPY --chown=abc:abc settings.json /home/abc/.local/share/code-server/User/settings.json
2023-07-06 03:36:02 +12:00
# Gonfigure Alnoda workspace
2022-09-17 20:23:45 +12:00
COPY --chown=abc:abc workspace /tmp/workspace
2023-07-06 03:36:02 +12:00
RUN wrk build /tmp/workspace && rm -rf /tmp/workspace