diff --git a/docker/Dockerfile b/docker/Dockerfile index 40ab494a6..c8fd0d305 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:18.04 +FROM ubuntu:20.04 ## for apt to be noninteractive ENV DEBIAN_FRONTEND noninteractive @@ -27,22 +27,12 @@ RUN apt-get install -qqy \ python3-pysam \ python3-setuptools \ samtools \ + util-linux \ wget \ zlib1g-dev RUN apt-get clean RUN pip3 install gffutils - -# Install gosu -ENV GOSU_VERSION 1.12 -RUN set -eux; \ - dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')"; \ - wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch"; \ - chmod +x /usr/local/bin/gosu; \ -# verify that the binary works - gosu --version; \ - gosu nobody true - RUN git clone --depth=1 --recursive https://github.com/AlgoLab/galig.git RUN cd galig ; make prerequisites RUN cd galig ; make diff --git a/docker/asgal-docker.sh b/docker/asgal-docker.sh index 770148742..f8630d037 100755 --- a/docker/asgal-docker.sh +++ b/docker/asgal-docker.sh @@ -6,7 +6,7 @@ USER_ID=$(/usr/bin/stat -c %u /data) GROUP_ID=$(/usr/bin/stat -c %g /data) # When running as root, use a dummy command to change user -GOSU_CMD="gosu root:root" +SU_CMD="setpriv --reuid=root --regid=root" # If the owner is not root, we create user:group with the correct uid:gid if [ "$USER_ID" != "0" ] @@ -15,7 +15,7 @@ then groupadd -g "$GROUP_ID" group useradd --shell /bin/bash -u "$USER_ID" -g group -o -c "" -m user chown --recursive "$USER_ID":"$GROUP_ID" /data - GOSU_CMD="gosu user:group" + SU_CMD="setpriv --reuid=user --regid=group --init-groups" fi export HOME=/ @@ -27,7 +27,7 @@ then then if [ -s /data/sample_2.fq ] then - $GOSU_CMD \ + $SU_CMD \ /galig/asgal --multi \ -g /data/genome.fa \ -a /data/annotation.gtf \ @@ -36,7 +36,7 @@ then -t /data/transcripts.fa \ -o /data/output else - $GOSU_CMD \ + $SU_CMD \ /galig/asgal --multi \ -g /data/genome.fa \ -a /data/annotation.gtf \ @@ -47,7 +47,7 @@ then else if [ -s /data/sample_2.fa ] then - $GOSU_CMD \ + $SU_CMD \ /galig/asgal --multi \ -g /data/genome.fa \ -a /data/annotation.gtf \ @@ -56,7 +56,7 @@ then -t /data/transcripts.fa \ -o /data/output else - $GOSU_CMD \ + $SU_CMD \ /galig/asgal --multi \ -g /data/genome.fa \ -a /data/annotation.gtf \ @@ -68,13 +68,13 @@ then else if [ -s /data/sample_1.fq ] then - $GOSU_CMD \ + $SU_CMD \ /galig/asgal -g /data/genome.fa \ -a /data/annotation.gtf \ -s /data/sample_1.fq \ -o /data/output else - $GOSU_CMD \ + $SU_CMD \ /galig/asgal -g /data/genome.fa \ -a /data/annotation.gtf \ -s /data/sample_1.fa \