Skip to content

Commit

Permalink
Configure Nextstrain CLI to use the ambient runtime inside this runtime
Browse files Browse the repository at this point in the history
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.¹

¹ <https://bedfordlab.slack.com/archives/C01LCTT7JNN/p1694718932379359>
  • Loading branch information
tsibley committed Sep 14, 2023
1 parent a6b0577 commit 6f91521
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6f91521

Please sign in to comment.