Skip to content

Commit de04647

Browse files
committed
🚧 use nextstrain user, remove unnecessary envs
1 parent 744419e commit de04647

1 file changed

Lines changed: 9 additions & 15 deletions

File tree

‎Dockerfile‎

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,26 @@
11
FROM nextstrain/base:latest
22

3+
# Run the final setup as our target user for permissions reasons.
4+
USER nextstrain:nextstrain
5+
36
# Install Miniforge (includes conda)
4-
# FIXME: check permissions
57
RUN curl -L "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-$(uname -m).sh" -o miniforge.sh && \
68
bash miniforge.sh -b -p /nextstrain/miniforge && \
7-
rm miniforge.sh && \
8-
chmod -R 777 /nextstrain/miniforge
9+
rm miniforge.sh
910

1011
# Make conda available in PATH
1112
ENV PATH="/nextstrain/miniforge/bin:$PATH"
1213

1314
# Initialize conda for interactive shell use
1415
RUN conda init bash
1516

16-
# FIXME: is `umask 000` ok to use here?
17-
1817
# Create conda environments
19-
COPY envs/csvtk.yaml /tmp/
20-
RUN umask 000 && conda env create --name csvtk --file /tmp/csvtk.yaml && rm /tmp/csvtk.yaml
21-
22-
COPY envs/nextstrain.yaml /tmp/
23-
RUN umask 000 && conda env create --name nextstrain --file /tmp/nextstrain.yaml && rm /tmp/nextstrain.yaml
24-
2518
COPY envs/snippy.yaml /tmp/
26-
RUN umask 000 && conda env create --name snippy --file /tmp/snippy.yaml && rm /tmp/snippy.yaml
19+
RUN conda env create --name snippy --file /tmp/snippy.yaml && rm /tmp/snippy.yaml
2720

2821
COPY envs/tb-profiler.yaml /tmp/
29-
RUN umask 000 && conda env create --name tb-profiler --file /tmp/tb-profiler.yaml && rm /tmp/tb-profiler.yaml
22+
RUN conda env create --name tb-profiler --file /tmp/tb-profiler.yaml && rm /tmp/tb-profiler.yaml
3023

31-
COPY envs/tsv-utils.yaml /tmp/
32-
RUN umask 000 && conda env create --name tsv-utils --file /tmp/tsv-utils.yaml && rm /tmp/tsv-utils.yaml
24+
# Switch back to root. The entrypoint will drop to nextstrain:nextstrain as
25+
# necessary when a container starts.
26+
USER root

0 commit comments

Comments
 (0)