Skip to content

Commit

Permalink
refs #5: Update nodejs version from 4.x to 6.x
Browse files Browse the repository at this point in the history
 * Modify Dockerfile to use package version of Python 2.7 instead of
   manually building it (required for node-gyp module builds)

 * Next TODO: udpate run.js for new PUSH/PULL agent protocol.
  • Loading branch information
achimnol committed Feb 8, 2017
1 parent 86c41a0 commit 8fd5d18
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 14 deletions.
34 changes: 21 additions & 13 deletions nodejs4/Dockerfile → nodejs6/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 <dockerfile_dir>/
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion php7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8fd5d18

Please sign in to comment.