diff --git a/base/singularity:3.1 b/base/singularity:3.1
index 67a879da3ac617f6b2ac41b6077c384faa82a286..e389c5060a4678ec647f0e4525784a699f872844 100644
--- a/base/singularity:3.1
+++ b/base/singularity:3.1
@@ -1,12 +1,16 @@
- FROM centos:7.4.1708
+FROM debian:stretch
   MAINTAINER Kay Graf <kay.graf@km3net.de>
- 
-  RUN yum install -y git subversion wget && yum clean -y all
-  RUN yum install -y ant bison flex-devel gcc gcc-c++ gcc-gfortran gdb make cmake glibc-static strace && yum clean -y all
-  RUN yum install -y doxygen && yum clean -y all
+#Install Singularity as described on https://github.com/sylabs/singularity/blob/master/INSTALL.md
+  RUN apt-get update -qq && apt-get install -qq -y wget bzip2 python-pip git  
+  RUN apt-get install -qq -y build-essential libssl-dev uuid-dev libgpgme11-dev libseccomp-dev pkg-config squashfs-tools 
+  RUN export VERSION=1.11.4 OS=linux ARCH=amd64 && wget -q -O /tmp/go${VERSION}.${OS}-${ARCH}.tar.gz https://dl.google.com/go/go${VERSION}.${OS}-${ARCH}.tar.gz && \ 
+ tar -C /usr/local -xzf /tmp/go${VERSION}.${OS}-${ARCH}.tar.gz
+  RUN export GOPATH=${HOME}/go && mkdir -p ${GOPATH}/src/github.com/sylabs && cd ${GOPATH}/src/github.com/sylabs &&\ 
+ git clone https://github.com/sylabs/singularity.git && cd singularity && git checkout v3.1.0-rc2
+  RUN export GOPATH=${HOME}/go && export PATH=/usr/local/go/bin:${PATH}:${GOPATH}/bin && cd ${GOPATH}/src/github.com/sylabs/singularity && ./mconfig && cd ./builddir && make && make install
 
-  RUN yum groupinstall -y 'Development Tools' && yum install -y epel-release && yum install -y golang openssl-devel libuuid-devel libseccomp-devel squashfs-tools
-
-  RUN export GOPATH=${HOME}/go && export PATH=/usr/local/go/bin:${PATH}:${GOPATH}/bin
-  RUN mkdir -p ${GOPATH}/src/github.com/sylabs && cd ${GOPATH}/src/github.com/sylabs &&  git clone https://github.com/sylabs/singularity.git && cd singularity && git checkout v3.1.0-rc2
-  RUN cd ${GOPATH}/src/github.com/sylabs/singularity && ./mconfig && cd ./builddir && make && make install
\ No newline at end of file
+#Set the go environment 
+   RUN echo $'\
+ export GOPATH=${HOME}/go\n\
+ export PATH=/usr/local/go/bin:${PATH}:${GOPATH}/bin'\
+     >> /etc/profile.d/go_env.sh