diff --git a/nodejs4/Dockerfile b/nodejs6/Dockerfile similarity index 56% rename from nodejs4/Dockerfile rename to nodejs6/Dockerfile index 9cf2b3382..ebad46284 100644 --- a/nodejs4/Dockerfile +++ b/nodejs6/Dockerfile @@ -15,16 +15,16 @@ ENV HOME /home/work # Install latest node.js 4.x ENV DEBIAN_FRONTEND noninteractive RUN sed -i 's/archive\.ubuntu\.com/kr.archive.ubuntu.com/' /etc/apt/sources.list +RUN echo 'APT::Install-Recommends "false";' >> /etc/apt/apt.conf; \ + echo 'APT::Install-Suggests "false";' >> /etc/apt/apt.conf RUN apt-get update -RUN apt-get install -y curl build-essential -RUN apt-get install -y libreadline-dev libncursesw5-dev libssl-dev libsqlite3-dev libgdbm-dev libc6-dev libbz2-dev -RUN apt-get install -y wget -WORKDIR /home/sorna -RUN wget https://www.python.org/ftp/python/2.7.11/Python-2.7.11.tgz && tar xzvf Python-2.7.11.tgz -WORKDIR /home/sorna/Python-2.7.11 -RUN ./configure && make altinstall -RUN ln -s /usr/local/bin/python2.7 /usr/bin/python -RUN curl -sL https://deb.nodesource.com/setup_4.x | bash - +RUN apt-get install -y --only-upgrade tzdata +RUN apt-get install -y curl wget build-essential ca-certificates libseccomp2 \ + libreadline-dev libncursesw5-dev libssl-dev libsqlite3-dev \ + libgdbm-dev libc6-dev libbz2-dev python2.7-minimal python2.7-dev +RUN update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1; \ + update-alternatives --auto python +RUN curl -sL https://deb.nodesource.com/setup_6.x | bash - RUN apt-get install -y nodejs # Install packages @@ -35,19 +35,27 @@ RUN cd /home/sorna; npm install; cd $HOME # Secure installation scripts USER root -ADD run.js /home/sorna/run.js ADD run.sh /home/sorna/run.sh -# NOTE: you must copy $GOPATH/bin to / -RUN apt-get install -y libseccomp2 ADD jail /home/sorna/jail ADD intra-jail /home/sorna/intra-jail RUN chown root:root /home/sorna/*.sh /home/sorna/jail /home/sorna/intra-jail RUN chmod 600 /home/sorna/*.sh RUN chmod 755 /home/sorna/run.sh /home/sorna/jail /home/sorna/intra-jail +ADD patch-libs.so /home/sorna/patch-libs.so +ENV LD_PRELOAD /home/sorna/patch-libs.so WORKDIR /home/work VOLUME ["/home/work"] -EXPOSE 2001 +EXPOSE 2000 2001 + +LABEL io.sorna.timeout="10" +LABEL io.sorna.maxmem="128m" +LABEL io.sorna.maxcores="1" +LABEL io.sorna.mode="query" +LABEL io.sorna.envs.corecount="NPROC" +LABEL io.sorna.version="2" + +ADD run.js /home/sorna/run.js USER work CMD /home/sorna/run.sh diff --git a/nodejs4/package.json b/nodejs6/package.json similarity index 100% rename from nodejs4/package.json rename to nodejs6/package.json diff --git a/nodejs4/run.js b/nodejs6/run.js similarity index 100% rename from nodejs4/run.js rename to nodejs6/run.js diff --git a/nodejs4/run.sh b/nodejs6/run.sh similarity index 100% rename from nodejs4/run.sh rename to nodejs6/run.sh diff --git a/php7/Dockerfile b/php7/Dockerfile index 3789d89de..c54f1722b 100644 --- a/php7/Dockerfile +++ b/php7/Dockerfile @@ -33,7 +33,6 @@ RUN echo 'extension=zmq.so' > /etc/php/7.0/cli/conf.d/20-zmq.ini # Secure installation scripts USER root ADD run.sh /home/sorna/run.sh - ADD jail /home/sorna/jail ADD intra-jail /home/sorna/intra-jail RUN chown root:root /home/sorna/*.sh /home/sorna/jail /home/sorna/intra-jail