blob: 866f21a95553692f4ae77a7ae8a2f129a3ae50d6 [file] [log] [blame]
David Crawshawb7a06632025-05-05 09:52:20 -07001FROM ghcr.io/boldsoftware/sketch:f5b4ebd9ca15d3dbd2cd08e6e7ab9548
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
David Crawshawb7a06632025-05-05 09:52:20 -070010LABEL sketch_context="26cda6870ba9562802f4a56d488b5f48d95d8ec7834ba62f043bbd50a2a18c1e"
Earl Lee2e463fb2025-04-17 11:22:22 -070011COPY . /app
12
13WORKDIR /app
14RUN if [ -f go.mod ]; then go mod download; fi
15
David Crawshawb7a06632025-05-05 09:52:20 -070016# Switch to lenient shell so we are more likely to get past failing extra_cmds.
17SHELL ["/bin/bash", "-uo", "pipefail", "-c"]
18
19# Install Python 3.11 and pip
David Crawshawfa67fe52025-05-01 20:42:08 +000020RUN apt-get update && \
David Crawshawb7a06632025-05-05 09:52:20 -070021 apt-get install -y --no-install-recommends python3.11 python3.11-dev python3.11-venv python3-pip || true
22
23# Set up Python alternatives to make 3.11 the default
24RUN if command -v update-alternatives &> /dev/null; then \
25 update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 1 || true; \
26 fi
27
28# Install DVC tool
29RUN pip3 install dvc || true
30
31# Clean up apt cache
32RUN apt-get clean && \
David Crawshawfa67fe52025-05-01 20:42:08 +000033 rm -rf /var/lib/apt/lists/*
Josh Bleecher Snyderc76a3922025-05-01 01:18:56 +000034
David Crawshawb7a06632025-05-05 09:52:20 -070035# Switch back to strict shell after extra_cmds.
36SHELL ["/bin/bash", "-euxo", "pipefail", "-c"]
David Crawshaw11129492025-04-25 20:41:53 -070037
38CMD ["/bin/sketch"]