From 8294bb5e599124802476cc06088d10ffe2654d30 Mon Sep 17 00:00:00 2001 From: Isaac Good Date: Wed, 6 May 2026 22:47:01 -0700 Subject: [PATCH 1/2] Reduce `apt-get` size with a purge, cleanup and drop recommends. This reduces the `apt-get` step from 123MB to 59.7MB and the overall size from 432MB to 369MB. Ignoring the shared Ubuntu base (78.1MB), that reduces the yamlscript space cost from 354MB to 291MB for a 21% reduction. --- Dockerfile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index e35694c..1894d07 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,14 +9,16 @@ FROM ubuntu:24.04 # Install packages required to run the tests: RUN apt-get update \ - && apt-get install -y apt-utils \ - && apt-get install -y \ + && apt-get install --yes --no-install-recommends \ + ca-certificates \ curl \ jq \ make \ perl \ xz-utils \ - && true + && apt-get purge --auto-remove -y \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* # Install a specific version of shellcheck: RUN curl -sSOL https://github.com/koalaman/shellcheck/releases/download/v0.10.0/shellcheck-v0.10.0.linux.x86_64.tar.xz \ From 9ef1722a6c64dabf778768d4f4cac7a411c9be1e Mon Sep 17 00:00:00 2001 From: Isaac Good Date: Wed, 6 May 2026 22:57:28 -0700 Subject: [PATCH 2/2] Drop `--read-only` from `run-in-docker.sh` so the tests can actually run --- bin/run-in-docker.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/bin/run-in-docker.sh b/bin/run-in-docker.sh index 15d478a..af248fe 100755 --- a/bin/run-in-docker.sh +++ b/bin/run-in-docker.sh @@ -39,7 +39,6 @@ docker build --rm -t exercism/yamlscript-test-runner . docker run \ --rm \ --network none \ - --read-only \ --mount type=bind,src="${solution_dir}",dst=/solution \ --mount type=bind,src="${output_dir}",dst=/output \ --mount type=tmpfs,dst=/tmp \