From 6f91521c13fdf073a1d27c9f71eb076aa4a26300 Mon Sep 17 00:00:00 2001 From: Thomas Sibley Date: Thu, 14 Sep 2023 13:43:02 -0700 Subject: [PATCH] Configure Nextstrain CLI to use the ambient runtime inside this runtime MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If users enter a `nextstrain shell` with this Docker runtime, we want `nextstrain` inside that to use the ambient environment. Reported by @corneliusroemer in Slack.¹ ¹ --- Dockerfile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Dockerfile b/Dockerfile index 6d61742..fd11c23 100644 --- a/Dockerfile +++ b/Dockerfile @@ -493,6 +493,13 @@ RUN useradd nextstrain \ --home-dir /nextstrain \ --no-log-init +# No nesting of runtimes, please. Use the ambient runtime inside this runtime. +ENV NEXTSTRAIN_HOME=/nextstrain +RUN nextstrain check-setup --set-default ambient \ + && chown nextstrain:nextstrain /nextstrain/config \ + && chmod a+rw /nextstrain/config \ + && rm -f /nextstrain/lock + # The host should bind mount the pathogen build dir into /nextstrain/build. WORKDIR /nextstrain/build RUN chown nextstrain:nextstrain /nextstrain/build