| Earl Lee | 2e463fb | 2025-04-17 11:22:22 -0700 | [diff] [blame] | 1 | FROM ghcr.io/astral-sh/uv:python3.11-alpine |
| 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 | |
| Earl Lee | 2e463fb | 2025-04-17 11:22:22 -0700 | [diff] [blame] | 15 | ARG GIT_USER_EMAIL |
| 16 | ARG GIT_USER_NAME |
| 17 | |
| 18 | RUN git config --global user.email "$GIT_USER_EMAIL" && \ |
| 19 | git config --global user.name "$GIT_USER_NAME" |
| 20 | |
| David Crawshaw | 1112949 | 2025-04-25 20:41:53 -0700 | [diff] [blame^] | 21 | LABEL sketch_context="1e26552a9d39a0cdaacc7efdcb4d9dd0f94b2d041bb583c3214f0c02be93c89f" |
| Earl Lee | 2e463fb | 2025-04-17 11:22:22 -0700 | [diff] [blame] | 22 | COPY . /app |
| 23 | |
| 24 | WORKDIR /app |
| 25 | RUN if [ -f go.mod ]; then go mod download; fi |
| 26 | |
| David Crawshaw | 1112949 | 2025-04-25 20:41:53 -0700 | [diff] [blame^] | 27 | RUN apk add go || true |
| 28 | # Install DVC tool as mentioned in the README |
| 29 | RUN uv pip install --system dvc || true |
| 30 | |
| 31 | # Ensure git is properly configured for DVC |
| 32 | RUN git config --global init.defaultBranch main || true |
| 33 | |
| 34 | CMD ["/bin/sketch"] |