Skip to content

Commit

Permalink
Add nonroot user for conda install
Browse files Browse the repository at this point in the history
  • Loading branch information
adamd3 committed Jun 18, 2024
1 parent 7e1eb2d commit 66ea918
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,16 @@ ENV PATH=/opt/conda/envs/bact_seq-1.0.0/bin:$PATH
ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8

RUN useradd -m -s /bin/bash nextflow_user
USER nextflow_user
WORKDIR /home/nextflow_user

RUN echo ". /opt/conda/etc/profile.d/conda.sh" >> ~/.bashrc && \
echo "source activate bact_seq-1.0.0" >> ~/.bashrc && \
git clone https://github.com/adamd3/BactSeq.git && \
/opt/conda/bin/conda env create -f BactSeq/environment.yml && \
rm -rf BactSeq

ENTRYPOINT ["bash", "-c"]
ENTRYPOINT ["/bin/bash", "-l", "-c"]

CMD ["exec \"$@\""]
CMD ["bash"]

0 comments on commit 66ea918

Please sign in to comment.