| David Crawshaw | 5228b58 | 2025-05-01 11:18:12 -0700 | [diff] [blame] | 1 | FROM ghcr.io/boldsoftware/sketch:86ef7a672f85139e73f38d4cdf78d95f |
| Earl Lee | 2e463fb | 2025-04-17 11:22:22 -0700 | [diff] [blame] | 2 | |
| 3 | ARG GIT_USER_EMAIL |
| 4 | ARG GIT_USER_NAME |
| 5 | |
| 6 | RUN git config --global user.email "$GIT_USER_EMAIL" && \ |
| 7 | git config --global user.name "$GIT_USER_NAME" |
| 8 | |
| David Crawshaw | 5228b58 | 2025-05-01 11:18:12 -0700 | [diff] [blame] | 9 | LABEL sketch_context="5820b50cae54d2fbdd28081f960dcfac4367f8d805030ecd612a13ebeef13bb1" |
| Earl Lee | 2e463fb | 2025-04-17 11:22:22 -0700 | [diff] [blame] | 10 | COPY . /app |
| 11 | |
| 12 | WORKDIR /app |
| 13 | RUN if [ -f go.mod ]; then go mod download; fi |
| 14 | |
| David Crawshaw | 5228b58 | 2025-05-01 11:18:12 -0700 | [diff] [blame] | 15 | RUN --mount=type=cache,target=/var/cache/apt \ |
| 16 | set -eux; \ |
| 17 | apt-get update && \ |
| 18 | apt-get install -y --no-install-recommends python3-pip python3-venv || true |
| Josh Bleecher Snyder | c76a392 | 2025-05-01 01:18:56 +0000 | [diff] [blame] | 19 | |
| David Crawshaw | 5228b58 | 2025-05-01 11:18:12 -0700 | [diff] [blame] | 20 | # Set up Python environment, allowing failures to not stop the build |
| 21 | RUN python3 -m pip install --upgrade pip || true |
| Josh Bleecher Snyder | c76a392 | 2025-05-01 01:18:56 +0000 | [diff] [blame] | 22 | |
| David Crawshaw | 5228b58 | 2025-05-01 11:18:12 -0700 | [diff] [blame] | 23 | # Install any Go tools specific to this project if needed |
| 24 | RUN --mount=type=cache,target=/go/pkg/mod \ |
| 25 | --mount=type=cache,target=/root/.cache/go-build \ |
| 26 | go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest || true |
| David Crawshaw | 1112949 | 2025-04-25 20:41:53 -0700 | [diff] [blame] | 27 | |
| 28 | CMD ["/bin/sketch"] |