| Earl Lee | 2e463fb | 2025-04-17 11:22:22 -0700 | [diff] [blame] | 1 | FROM golang:1.24.2-alpine3.21 |
| 2 | |
| 3 | RUN apk add bash git make jq sqlite gcc musl-dev linux-headers npm nodejs go github-cli ripgrep fzf |
| 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 | |
| 15 | RUN apk add --no-cache build-base || true |
| 16 | |
| 17 | # Set up any Go-specific environment |
| 18 | ENV CGO_ENABLED=1 |
| 19 | |
| 20 | # Install any additional Go tools that might be useful |
| 21 | RUN go install github.com/cweill/gotests/gotests@latest |
| 22 | RUN go install github.com/fatih/gomodifytags@latest |
| 23 | RUN go install github.com/josharian/impl@latest |
| 24 | RUN go install github.com/haya14busa/goplay/cmd/goplay@latest |
| 25 | RUN go install github.com/go-delve/delve/cmd/dlv@latest |
| Earl Lee | 2e463fb | 2025-04-17 11:22:22 -0700 | [diff] [blame] | 26 | |
| 27 | ARG GIT_USER_EMAIL |
| 28 | ARG GIT_USER_NAME |
| 29 | |
| 30 | RUN git config --global user.email "$GIT_USER_EMAIL" && \ |
| 31 | git config --global user.name "$GIT_USER_NAME" |
| 32 | |
| David Crawshaw | be10fa9 | 2025-04-18 01:16:00 -0700 | [diff] [blame] | 33 | LABEL sketch_context="29f9694d78039a6a093f09ec31e8d1a19a6c75f5eb5c69dac6ac2395763b42e8" |
| Earl Lee | 2e463fb | 2025-04-17 11:22:22 -0700 | [diff] [blame] | 34 | COPY . /app |
| 35 | |
| 36 | WORKDIR /app |
| 37 | RUN if [ -f go.mod ]; then go mod download; fi |
| 38 | |
| 39 | CMD ["/bin/sketch"] |