| Earl Lee | 2e463fb | 2025-04-17 11:22:22 -0700 | [diff] [blame] | 1 | FROM golang:1.24.2-alpine3.21 |
| 2 | |
| Philip Zeyliger | cc3ba22 | 2025-04-23 14:52:21 -0700 | [diff] [blame] | 3 | RUN apk add bash git make jq sqlite gcc musl-dev linux-headers npm nodejs go github-cli ripgrep fzf python3 curl vim |
| Earl Lee | 2e463fb | 2025-04-17 11:22:22 -0700 | [diff] [blame] | 4 | |
| 5 | ENV GOTOOLCHAIN=auto |
| 6 | ENV GOPATH=/go |
| 7 | ENV PATH="$GOPATH/bin:$PATH" |
| 8 | |
| 9 | RUN go install golang.org/x/tools/cmd/goimports@latest |
| 10 | RUN go install golang.org/x/tools/gopls@latest |
| 11 | RUN go install mvdan.cc/gofumpt@latest |
| 12 | |
| David Crawshaw | be10fa9 | 2025-04-18 01:16:00 -0700 | [diff] [blame] | 13 | RUN mkdir -p /root/.cache/sketch/webui |
| 14 | |
| Philip Zeyliger | cc3ba22 | 2025-04-23 14:52:21 -0700 | [diff] [blame] | 15 | RUN apk add --no-cache build-base || true |
| Earl Lee | 2e463fb | 2025-04-17 11:22:22 -0700 | [diff] [blame] | 16 | |
| 17 | ARG GIT_USER_EMAIL |
| 18 | ARG GIT_USER_NAME |
| 19 | |
| 20 | RUN git config --global user.email "$GIT_USER_EMAIL" && \ |
| 21 | git config --global user.name "$GIT_USER_NAME" |
| 22 | |
| Philip Zeyliger | cc3ba22 | 2025-04-23 14:52:21 -0700 | [diff] [blame] | 23 | LABEL sketch_context="f20a1b665182f3a8a94fe3e1e2042ee1d820fe00af69c72989146e26de9569ba" |
| Earl Lee | 2e463fb | 2025-04-17 11:22:22 -0700 | [diff] [blame] | 24 | COPY . /app |
| 25 | |
| 26 | WORKDIR /app |
| 27 | RUN if [ -f go.mod ]; then go mod download; fi |
| 28 | |
| 29 | CMD ["/bin/sketch"] |