From 116d2e3d045de3b479f55bc5a7792dc3b4d6fbae Mon Sep 17 00:00:00 2001 From: Shaun Jackman Date: Fri, 5 Oct 2018 16:11:57 -0700 Subject: [PATCH] Dockerfile: Add a user for OpenMPI (#257) OpenMPI does not like to be run as root. --- Dockerfile | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index a7fa6abb4..fc56e1c23 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,20 +1,24 @@ -FROM ubuntu:latest +FROM ubuntu:18.04 MAINTAINER Shaun Jackman RUN apt-get update \ && apt-get install -y --no-install-recommends \ - bsdmainutils libgomp1 make openmpi-bin ssh + bsdmainutils libgomp1 make openmpi-bin ssh sudo \ + && useradd -m -s /bin/bash abyss \ + && echo 'abyss ALL=(ALL) NOPASSWD:ALL' >>/etc/sudoers ADD . /tmp/abyss RUN apt-get install -y --no-install-recommends \ automake g++ libboost-dev libopenmpi-dev libsparsehash-dev \ && cd /tmp/abyss \ && ./autogen.sh \ && mkdir build && cd build \ - && ../configure --with-mpi=/usr/lib/openmpi \ + && ../configure --with-mpi=/usr/lib/x86_64-linux-gnu/openmpi \ && make install-strip \ && rm -rf /tmp/abyss \ && apt-get autoremove -y binutils \ automake g++ libboost-dev libopenmpi-dev libsparsehash-dev -ENV SHELL=/bin/bash +USER abyss +WORKDIR /home/abyss +ENV SHELL=/bin/bash USER=abyss ENTRYPOINT ["abyss-pe"] CMD ["help"]