blob: 1a3fe68e6fb3eb9cc0f8bb1cdd8cd099e4b33218 [file] [log] [blame]
Philip Zeyliger33d282f2025-05-03 04:01:54 +00001FROM ghcr.io/boldsoftware/sketch:99a2e4afe316b3c6cf138830dbfb7796
Earl Lee2e463fb2025-04-17 11:22:22 -07002
3ARG GIT_USER_EMAIL
4ARG GIT_USER_NAME
5
6RUN git config --global user.email "$GIT_USER_EMAIL" && \
David Crawshawca535582025-05-03 13:04:34 -07007 git config --global user.name "$GIT_USER_NAME" && \
8 git config --global http.postBuffer 524288000
Earl Lee2e463fb2025-04-17 11:22:22 -07009
Philip Zeyliger33d282f2025-05-03 04:01:54 +000010LABEL sketch_context="45ae7c2a65560701f1da47223747d1e8d9e62d75b5fc28b51d3a5f6afb0daa3e"
Earl Lee2e463fb2025-04-17 11:22:22 -070011COPY . /app
David Crawshaw8fd51042025-05-05 12:52:43 -070012RUN rm -f /app/tmp-sketch-dockerfile
Earl Lee2e463fb2025-04-17 11:22:22 -070013
14WORKDIR /app
15RUN if [ -f go.mod ]; then go mod download; fi
16
David Crawshawb7a06632025-05-05 09:52:20 -070017# Switch to lenient shell so we are more likely to get past failing extra_cmds.
18SHELL ["/bin/bash", "-uo", "pipefail", "-c"]
19
David Crawshaw53b02a62025-05-12 14:46:29 -070020RUN echo "Setting up a minimal Go test project environment"
21
22# Install any Go-specific testing tools
23RUN go install github.com/stretchr/testify@latest || true
24
25# Basic Python environment setup (optional, will continue if it fails)
26RUN pip3 install pytest pytest-cov || true
27
28# Run initial setup if needed
29RUN if [ -f "Makefile" ]; then make setup || true; fi
David Crawshawb7a06632025-05-05 09:52:20 -070030
31# Switch back to strict shell after extra_cmds.
32SHELL ["/bin/bash", "-euxo", "pipefail", "-c"]
David Crawshaw11129492025-04-25 20:41:53 -070033
34CMD ["/bin/sketch"]