blob: ca16e5c8d91464b89776d44678dd15d7873fca7a [file] [log] [blame]
Philip Zeyliger9df94b52025-05-18 03:43:14 +00001FROM golang:1.24-bookworm
2
3# Switch from dash to bash by default.
4SHELL ["/bin/bash", "-euxo", "pipefail", "-c"]
5
6# attempt to keep package installs lean
7RUN printf '%s\n' \
8 'path-exclude=/usr/share/man/*' \
9 'path-exclude=/usr/share/doc/*' \
10 'path-exclude=/usr/share/doc-base/*' \
11 'path-exclude=/usr/share/info/*' \
12 'path-exclude=/usr/share/locale/*' \
13 'path-exclude=/usr/share/groff/*' \
14 'path-exclude=/usr/share/lintian/*' \
15 'path-exclude=/usr/share/zoneinfo/*' \
16 > /etc/dpkg/dpkg.cfg.d/01_nodoc
17
18RUN apt-get update; \
19 apt-get install -y --no-install-recommends \
20 git jq sqlite3 npm nodejs gh ripgrep fzf python3 curl vim chromium lsof iproute2 less && \
21 apt-get clean && \
22 rm -rf /var/lib/apt/lists/* && \
23 rm -rf /usr/share/{doc,doc-base,info,lintian,man,groff,locale,zoneinfo}/*
24
25ENV PATH="$GOPATH/bin:$PATH"
26
27# While these binaries install generally useful supporting packages,
28# the specific versions are rarely what a user wants so there is no
29# point polluting the base image module with them.
30
31RUN go install golang.org/x/tools/cmd/goimports@latest; \
32 go install golang.org/x/tools/gopls@latest; \
33 go install mvdan.cc/gofumpt@latest; \
34 go clean -cache -testcache -modcache
35
36ENV GOTOOLCHAIN=auto
37ENV SKETCH=1
38
39RUN mkdir -p /root/.cache/sketch/webui