| Earl Lee | 2e463fb | 2025-04-17 11:22:22 -0700 | [diff] [blame] | 1 | FROM ghcr.io/astral-sh/uv:python3.11-alpine |
| 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 | |
| Earl Lee | 2e463fb | 2025-04-17 11:22:22 -0700 | [diff] [blame] | 15 | RUN apk add go || true |
| 16 | |
| David Crawshaw | be10fa9 | 2025-04-18 01:16:00 -0700 | [diff] [blame^] | 17 | # Install Python requirements and DVC |
| Earl Lee | 2e463fb | 2025-04-17 11:22:22 -0700 | [diff] [blame] | 18 | RUN uv pip install --system dvc || true |
| 19 | |
| David Crawshaw | be10fa9 | 2025-04-18 01:16:00 -0700 | [diff] [blame^] | 20 | # Install any additional Python dependencies if present |
| 21 | RUN if [ -f requirements.txt ]; then uv pip install --system -r requirements.txt || true; fi |
| Earl Lee | 2e463fb | 2025-04-17 11:22:22 -0700 | [diff] [blame] | 22 | |
| 23 | ARG GIT_USER_EMAIL |
| 24 | ARG GIT_USER_NAME |
| 25 | |
| 26 | RUN git config --global user.email "$GIT_USER_EMAIL" && \ |
| 27 | git config --global user.name "$GIT_USER_NAME" |
| 28 | |
| David Crawshaw | be10fa9 | 2025-04-18 01:16:00 -0700 | [diff] [blame^] | 29 | LABEL sketch_context="cae736ee4f2f50e5bdf62697f39cba09beb8ae47c241c3db73df424f6fc03625" |
| Earl Lee | 2e463fb | 2025-04-17 11:22:22 -0700 | [diff] [blame] | 30 | COPY . /app |
| 31 | |
| 32 | WORKDIR /app |
| 33 | RUN if [ -f go.mod ]; then go mod download; fi |
| 34 | |
| 35 | CMD ["/bin/sketch"] |