| David Crawshaw | b7a0663 | 2025-05-05 09:52:20 -0700 | [diff] [blame^] | 1 | FROM ghcr.io/boldsoftware/sketch:f5b4ebd9ca15d3dbd2cd08e6e7ab9548 |
| David Crawshaw | be10fa9 | 2025-04-18 01:16:00 -0700 | [diff] [blame] | 2 | |
| Earl Lee | 2e463fb | 2025-04-17 11:22:22 -0700 | [diff] [blame] | 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="26cda6870ba9562802f4a56d488b5f48d95d8ec7834ba62f043bbd50a2a18c1e" |
| 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 Python 3.11 and pip |
| David Crawshaw | fa67fe5 | 2025-05-01 20:42:08 +0000 | [diff] [blame] | 20 | RUN apt-get update && \ |
| David Crawshaw | b7a0663 | 2025-05-05 09:52:20 -0700 | [diff] [blame^] | 21 | 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 |
| 24 | RUN 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 |
| 29 | RUN pip3 install dvc || true |
| 30 | |
| 31 | # Clean up apt cache |
| 32 | RUN apt-get clean && \ |
| David Crawshaw | fa67fe5 | 2025-05-01 20:42:08 +0000 | [diff] [blame] | 33 | rm -rf /var/lib/apt/lists/* |
| Josh Bleecher Snyder | c76a392 | 2025-05-01 01:18:56 +0000 | [diff] [blame] | 34 | |
| David Crawshaw | b7a0663 | 2025-05-05 09:52:20 -0700 | [diff] [blame^] | 35 | # Switch back to strict shell after extra_cmds. |
| 36 | SHELL ["/bin/bash", "-euxo", "pipefail", "-c"] |
| David Crawshaw | 1112949 | 2025-04-25 20:41:53 -0700 | [diff] [blame] | 37 | |
| 38 | CMD ["/bin/sketch"] |