From a47e358c8ce5a224cf794bddeb3c0ac85cedfc47 Mon Sep 17 00:00:00 2001 From: Victor Lin <13424970+victorlin@users.noreply.github.com> Date: Fri, 14 Oct 2022 17:45:26 +0000 Subject: [PATCH 1/3] Remove libpng-dev, add zlib1g-dev Upon removing libpng-dev, the build error from VCFtools is: No package 'zlib' found libpng-dev also installs zlib1g-dev as a dependency, which is why that worked. The build succeeds if zlib1g-dev is installed directly, so do that to avoid unnecessary installs. --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index efe513fe..0668d8e5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,8 +20,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ git \ jq \ libgmp-dev \ - libpng-dev \ - pkg-config + pkg-config \ + zlib1g-dev # Install a specific Node.js version # https://github.com/nodesource/distributions/blob/0d81da75/README.md#installation-instructions From 1bcd494c2cacf6f4c04fab8627214d23d4daee53 Mon Sep 17 00:00:00 2001 From: Victor Lin <13424970+victorlin@users.noreply.github.com> Date: Fri, 14 Oct 2022 17:53:45 +0000 Subject: [PATCH 2/3] Remove unused libgmp-dev The build succeeds without this installed. It was likely used at some point since added in 3917c1b9aa0aa19e694f94f6bd3e56418f248269, but building from that commit no longer works due to changes in upstream URL availability. I did not dig deeper to find out exactly where it was used. --- Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 0668d8e5..6d727717 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,7 +19,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ curl \ git \ jq \ - libgmp-dev \ pkg-config \ zlib1g-dev From 10ecb42656927aabecac019bb759dd90f182fd61 Mon Sep 17 00:00:00 2001 From: Victor Lin <13424970+victorlin@users.noreply.github.com> Date: Thu, 13 Oct 2022 10:54:29 -0700 Subject: [PATCH 3/3] Annotate package installs Currently, the reasoning on why each package is used 1. can be deduced from direct references in the Dockerfile (e.g. curl), or 2. can be deduced from git blame (e.g. jq: c256a30eccf08ba5c245656a2b2bc3b1f2f713f9), or 3. is unclear. To make this easier, document why each package is installed. --- Dockerfile | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Dockerfile b/Dockerfile index 6d727717..e6d5b6cf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,6 +11,15 @@ FROM python:3.7-slim-buster AS builder SHELL ["/bin/bash", "-c"] # Add system deps for building +# autoconf, automake: for building VCFtools; may be used by package managers to build from source +# build-essential: contains gcc, g++, make, etc. for building various tools; may be used by package managers to build from source +# ca-certificates: for secure HTTPS connections +# curl: for downloading source files +# git: for git pip installs +# jq: used in builder-scripts/latest-augur-release-tag +# pkg-config: for building VCFtools; may be used by package managers to build from source +# zlib1g-dev: for building VCFtools; may be used by package managers to build from source +# nodejs: for installing Auspice RUN apt-get update && apt-get install -y --no-install-recommends \ autoconf \ automake \ @@ -191,6 +200,15 @@ RUN cd /nextstrain/auspice && npm update && npm install && npm run build && npm FROM python:3.7-slim-buster AS final # Add system runtime deps +# bzip2, gzip, xz-utils, zip, unzip, zstd: install compression tools +# ca-certificates: [Dockerfile] for secure HTTPS connections; may be used by workflows +# curl: [Dockerfile] for downloading binaries directly; may be used by workflows +# jq: may be used by workflows +# less: for usability in an interactive prompt +# perl: for running VCFtools +# ruby: may be used by workflows +# wget: may be used by workflows +# nodejs: for running Auspice RUN apt-get update && apt-get install -y --no-install-recommends \ bzip2 \ ca-certificates \