-
Notifications
You must be signed in to change notification settings - Fork 6
/
entrypoint
executable file
·27 lines (24 loc) · 1013 Bytes
/
entrypoint
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash
set -euo pipefail
if [[ $# -eq 0 ]]; then
# If the container is run with no arguments, then print a message and exit.
cut -c 9- <<<"
This is the Nextstrain pathogen build container. It has a complete
Nextstrain environment installed which is normally accessed via the
\`nextstrain\` command on your computer (not in the container).
If you're seeing this message though, you're probably not using the
\`nextstrain\` command. Welcome! :-)
The default container entrypoint will exec a command-line of your
choosing in the build environment. You can use this functionality to
debug or develop Nextstrain pathogen builds and components. Refer to
the source of the \`nextstrain\` command for examples.
"
else
# Otherwise, exec chain into whatever command is provided.
exec \
drop-privs \
create-envd \
envdir /nextstrain/env.d \
delete-envd \
"$@"
fi