blob: 5a7f79355070258308e054f02d533f4b402c029c [file] [log] [blame]
Earl Lee2e463fb2025-04-17 11:22:22 -07001FROM golang:1.24.2-alpine3.21
2
3RUN apk add bash git make jq sqlite gcc musl-dev linux-headers npm nodejs go github-cli ripgrep fzf
4
5ENV GOTOOLCHAIN=auto
6ENV GOPATH=/go
7ENV PATH="$GOPATH/bin:$PATH"
8
9RUN go install golang.org/x/tools/cmd/goimports@latest
10RUN go install golang.org/x/tools/gopls@latest
11RUN go install mvdan.cc/gofumpt@latest
12
David Crawshawbe10fa92025-04-18 01:16:00 -070013RUN mkdir -p /root/.cache/sketch/webui
14
15RUN apk add --no-cache build-base || true
16
17# Set up any Go-specific environment
18ENV CGO_ENABLED=1
19
20# Install any additional Go tools that might be useful
21RUN go install github.com/cweill/gotests/gotests@latest
22RUN go install github.com/fatih/gomodifytags@latest
23RUN go install github.com/josharian/impl@latest
24RUN go install github.com/haya14busa/goplay/cmd/goplay@latest
25RUN go install github.com/go-delve/delve/cmd/dlv@latest
Earl Lee2e463fb2025-04-17 11:22:22 -070026
27ARG GIT_USER_EMAIL
28ARG GIT_USER_NAME
29
30RUN git config --global user.email "$GIT_USER_EMAIL" && \
31 git config --global user.name "$GIT_USER_NAME"
32
David Crawshawbe10fa92025-04-18 01:16:00 -070033LABEL sketch_context="29f9694d78039a6a093f09ec31e8d1a19a6c75f5eb5c69dac6ac2395763b42e8"
Earl Lee2e463fb2025-04-17 11:22:22 -070034COPY . /app
35
36WORKDIR /app
37RUN if [ -f go.mod ]; then go mod download; fi
38
39CMD ["/bin/sketch"]