| Earl Lee | 2e463fb | 2025-04-17 11:22:22 -0700 | [diff] [blame] | 1 | FROM ghcr.io/astral-sh/uv:python3.11-alpine |
| 2 | |
| Josh Bleecher Snyder | e2d24ab | 2025-04-30 00:01:41 +0000 | [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 grep |
| 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 | |
| Josh Bleecher Snyder | e2d24ab | 2025-04-30 00:01:41 +0000 | [diff] [blame] | 21 | LABEL sketch_context="7010851bfbb48df3a934ebc3eeff896d406d5f37c6a04d82a5ccdf403374d055" |
| 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 |
| Josh Bleecher Snyder | e2d24ab | 2025-04-30 00:01:41 +0000 | [diff] [blame] | 28 | |
| 29 | # Install DVC as mentioned in the README |
| David Crawshaw | 1112949 | 2025-04-25 20:41:53 -0700 | [diff] [blame] | 30 | RUN uv pip install --system dvc || true |
| 31 | |
| Josh Bleecher Snyder | e2d24ab | 2025-04-30 00:01:41 +0000 | [diff] [blame] | 32 | # Make sure Go tools are still installed in this Python-based image |
| 33 | RUN go install golang.org/x/tools/cmd/goimports@latest || true |
| 34 | RUN go install golang.org/x/tools/gopls@latest || true |
| 35 | RUN go install mvdan.cc/gofumpt@latest || true |
| David Crawshaw | 1112949 | 2025-04-25 20:41:53 -0700 | [diff] [blame] | 36 | |
| 37 | CMD ["/bin/sketch"] |