Merge pull request #2 from DECODEproject/dockerfile-fixes

Dockerfile fixes
This commit is contained in:
Jaromil 2018-09-25 17:43:52 +02:00 committed by GitHub
commit 57d798e22e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 11 deletions

View File

@ -27,13 +27,13 @@ ENV BUILD_DEPS="build-essential zlib1g-dev gcc make autoconf automake pkg-config
WORKDIR /root WORKDIR /root
# # debugging travis (finds gpg in local builds) # # debugging travis (finds gpg in local builds)
RUN apt-get -yq update \ RUN apt-get update \
&& apt-get -yq install gnupg1 ca-certificates --no-install-recommends \ && apt-get --yes --force-yes install gnupg1 ca-certificates --no-install-recommends \
&& echo "ENVIRONMENT VARIABLES:" \ && echo "ENVIRONMENT VARIABLES:" \
&& export && export
# Tor repository # Tor repository
COPY tor.pub.asc tor.pub.asc ADD https://raw.githubusercontent.com/DECODEproject/decode-os/master/docker-sdk/tor.pub.asc tor.pub.asc
RUN apt-key add tor.pub.asc RUN apt-key add tor.pub.asc
RUN echo "deb https://deb.torproject.org/torproject.org $debian main" \ RUN echo "deb https://deb.torproject.org/torproject.org $debian main" \
>> /etc/apt/sources.list >> /etc/apt/sources.list
@ -47,13 +47,13 @@ RUN echo "deb https://deb.nodesource.com/node_8.x $debian main" \
# && apt-get -yy update && apt-get -yy upgrade \ # && apt-get -yy update && apt-get -yy upgrade \
RUN mkdir -p /usr/share/man/man1/ \ RUN mkdir -p /usr/share/man/man1/ \
&& apt-get -yy update \ && apt-get update \
&& apt-get -yy install tor deb.torproject.org-keyring \ && apt-get --yes --force-yes install tor deb.torproject.org-keyring \
supervisor daemontools \ supervisor daemontools \
tmux curl redis-tools redis-server net-tools \ tmux curl redis-tools redis-server net-tools \
python3 python3-stem nodejs python3 python3-stem nodejs
RUN apt-get -yq install $BUILD_DEPS RUN apt-get --yes --force-yes install $BUILD_DEPS
# Latest Zenroom built static for x86-amd64 taken from our own builds at Dyne.org # Latest Zenroom built static for x86-amd64 taken from our own builds at Dyne.org
ADD $DYNESDK/zenroom-static-amd64/lastSuccessfulBuild/artifact/src/zenroom-static /usr/bin/zenroom ADD $DYNESDK/zenroom-static-amd64/lastSuccessfulBuild/artifact/src/zenroom-static /usr/bin/zenroom
@ -97,15 +97,16 @@ ADD https://openresty.org/package/pubkey.gpg openresty.gpg
RUN apt-key add openresty.gpg RUN apt-key add openresty.gpg
RUN echo "deb http://openresty.org/package/debian stretch openresty" \ RUN echo "deb http://openresty.org/package/debian stretch openresty" \
>> /etc/apt/sources.list >> /etc/apt/sources.list
RUN apt-get -yq update \ RUN apt-get update \
&& apt-get -yq install --no-install-recommends openresty && apt-get --yes --force-yes install --no-install-recommends openresty
# cleanup # cleanup
RUN apt-get -yq remove --purge $BUILD_DEPS \ RUN apt-get --yes --force-yes purge $BUILD_DEPS \
&& apt-get -yq --purge autoremove && apt-get -yq clean \ && apt-get --yes --force-yes --purge autoremove && apt-get clean \
&& npm cache clean --force && npm uninstall -g npm && npm cache clean --force && npm uninstall -g npm
COPY supervisord.conf /etc/supervisor/supervisord.conf ADD https://raw.githubusercontent.com/DECODEproject/decode-os/master/docker-sdk/supervisord.conf \
/etc/supervisor/supervisord.conf
RUN sed -i "s/nodaemon=true/nodaemon=$foreground/" /etc/supervisor/supervisord.conf RUN sed -i "s/nodaemon=true/nodaemon=$foreground/" /etc/supervisor/supervisord.conf
RUN groupadd -g 6000 app && useradd -r -u 6000 -g app -d /home/app app RUN groupadd -g 6000 app && useradd -r -u 6000 -g app -d /home/app app