File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -145,6 +145,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
145145 less \
146146 perl \
147147 ruby \
148+ util-linux \
148149 wget \
149150 xz-utils \
150151 zip unzip \
@@ -266,6 +267,7 @@ RUN useradd nextstrain \
266267
267268# The host should bind mount the pathogen build dir into /nextstrain/build.
268269WORKDIR /nextstrain/build
270+ RUN chown nextstrain:nextstrain /nextstrain/build
269271
270272ENTRYPOINT ["/sbin/entrypoint" ]
271273
Original file line number Diff line number Diff line change @@ -17,6 +17,11 @@ if [[ $# -eq 0 ]]; then
1717 the source of the \`nextstrain\` command for examples.
1818 "
1919else
20- # Otherwise, exec into whatever command is provided.
21- exec " $@ "
20+ # Otherwise, exec into whatever command is provided…
21+ if [[ " $( id -u) :$( id -g) " == 0:0 ]]; then
22+ # …switching to nextstrain:nextstrain first if we're root.
23+ exec setpriv --reuid nextstrain --regid nextstrain --init-groups " $@ "
24+ else
25+ exec " $@ "
26+ fi
2227fi
You can’t perform that action at this time.
0 commit comments