| David Crawshaw | b7a0663 | 2025-05-05 09:52:20 -0700 | [diff] [blame] | 1 | FROM ghcr.io/boldsoftware/sketch:f5b4ebd9ca15d3dbd2cd08e6e7ab9548 |
| 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" && \ |
| David Crawshaw | ca53558 | 2025-05-03 13:04:34 -0700 | [diff] [blame] | 7 | git config --global user.name "$GIT_USER_NAME" && \ |
| 8 | git config --global http.postBuffer 524288000 |
| Earl Lee | 2e463fb | 2025-04-17 11:22:22 -0700 | [diff] [blame] | 9 | |
| David Crawshaw | b7a0663 | 2025-05-05 09:52:20 -0700 | [diff] [blame] | 10 | LABEL sketch_context="1f68d38855871143c58b80c7f052e42141dd82d9a1214074ee734f758f463b8a" |
| Earl Lee | 2e463fb | 2025-04-17 11:22:22 -0700 | [diff] [blame] | 11 | COPY . /app |
| 12 | |
| 13 | WORKDIR /app |
| 14 | RUN if [ -f go.mod ]; then go mod download; fi |
| 15 | |
| David Crawshaw | b7a0663 | 2025-05-05 09:52:20 -0700 | [diff] [blame] | 16 | # Switch to lenient shell so we are more likely to get past failing extra_cmds. |
| 17 | SHELL ["/bin/bash", "-uo", "pipefail", "-c"] |
| 18 | |
| 19 | # Install common development tools |
| 20 | RUN go install github.com/rakyll/gotest@latest || true |
| 21 | RUN go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest || true |
| 22 | |
| 23 | # If there's a requirements.txt file for Python deps, install them (continue on error) |
| 24 | RUN if [ -f requirements.txt ]; then pip3 install -r requirements.txt || true; fi |
| 25 | |
| 26 | # Switch back to strict shell after extra_cmds. |
| 27 | SHELL ["/bin/bash", "-euxo", "pipefail", "-c"] |
| David Crawshaw | 1112949 | 2025-04-25 20:41:53 -0700 | [diff] [blame] | 28 | |
| 29 | CMD ["/bin/sketch"] |