blob: 8bd6ceb852f374088167f38e09e03c6acd39f296 [file] [log] [blame]
Philip Zeyligerda514fc2025-05-19 19:21:07 -07001FROM ghcr.io/boldsoftware/sketch:33392fad8fef8761c0ef3ec098713f00
David Crawshawbe10fa92025-04-18 01:16:00 -07002
Earl Lee2e463fb2025-04-17 11:22:22 -07003ARG 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 Zeyligerda514fc2025-05-19 19:21:07 -070010LABEL sketch_context="d1a2565ff3402ed91077dff3b4fee531722ad1651156d8178a3920acd41a4f92"
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
Philip Zeyligerda514fc2025-05-19 19:21:07 -070020RUN apt-get update && apt-get install -y python3.11 python3.11-venv python3-pip || true
Josh Bleecher Snyderc76a3922025-05-01 01:18:56 +000021
David Crawshaw53b02a62025-05-12 14:46:29 -070022# Install DVC (Data Version Control)
Philip Zeyligerda514fc2025-05-19 19:21:07 -070023RUN pip3 install dvc || true
Philip Zeyliger33d282f2025-05-03 04:01:54 +000024
Philip Zeyligerda514fc2025-05-19 19:21:07 -070025# Set up Python 3.11 as the default Python version if available
26RUN if command -v python3.11 &> /dev/null; then \
27 update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 1; \
28 fi || true
Philip Zeyliger33d282f2025-05-03 04:01:54 +000029
David Crawshawb7a06632025-05-05 09:52:20 -070030# Switch back to strict shell after extra_cmds.
31SHELL ["/bin/bash", "-euxo", "pipefail", "-c"]
David Crawshaw11129492025-04-25 20:41:53 -070032
33CMD ["/bin/sketch"]