blob: ca16e5c8d91464b89776d44678dd15d7873fca7a [file] [log] [blame]
FROM golang:1.24-bookworm
# Switch from dash to bash by default.
SHELL ["/bin/bash", "-euxo", "pipefail", "-c"]
# attempt to keep package installs lean
RUN printf '%s\n' \
'path-exclude=/usr/share/man/*' \
'path-exclude=/usr/share/doc/*' \
'path-exclude=/usr/share/doc-base/*' \
'path-exclude=/usr/share/info/*' \
'path-exclude=/usr/share/locale/*' \
'path-exclude=/usr/share/groff/*' \
'path-exclude=/usr/share/lintian/*' \
'path-exclude=/usr/share/zoneinfo/*' \
> /etc/dpkg/dpkg.cfg.d/01_nodoc
RUN apt-get update; \
apt-get install -y --no-install-recommends \
git jq sqlite3 npm nodejs gh ripgrep fzf python3 curl vim chromium lsof iproute2 less && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
rm -rf /usr/share/{doc,doc-base,info,lintian,man,groff,locale,zoneinfo}/*
ENV PATH="$GOPATH/bin:$PATH"
# While these binaries install generally useful supporting packages,
# the specific versions are rarely what a user wants so there is no
# point polluting the base image module with them.
RUN go install golang.org/x/tools/cmd/goimports@latest; \
go install golang.org/x/tools/gopls@latest; \
go install mvdan.cc/gofumpt@latest; \
go clean -cache -testcache -modcache
ENV GOTOOLCHAIN=auto
ENV SKETCH=1
RUN mkdir -p /root/.cache/sketch/webui