From f631fecbcb9f57add6a5e88967f1ccff39859dd1 Mon Sep 17 00:00:00 2001 From: Wonderfall Date: Fri, 3 Jun 2016 18:59:45 +0200 Subject: [PATCH] switch base to alpine edge --- boring-nginx/Dockerfile | 1 + cowrie/Dockerfile | 8 +++---- cowrie/run.sh | 13 ++++++------ isso/Dockerfile | 18 +++++++--------- nodejs/Dockerfile | 3 ++- rainloop/Dockerfile | 2 +- rutorrent/Dockerfile | 5 ++--- searx/Dockerfile | 46 +++++++++++++++++------------------------ searx/run.sh | 10 +++++---- subsonic/Dockerfile | 9 ++++---- tor/Dockerfile | 2 +- zerobin/Dockerfile | 8 +++---- 12 files changed, 58 insertions(+), 67 deletions(-) diff --git a/boring-nginx/Dockerfile b/boring-nginx/Dockerfile index ddd89df..0364e22 100644 --- a/boring-nginx/Dockerfile +++ b/boring-nginx/Dockerfile @@ -75,6 +75,7 @@ RUN echo "@commuedge http://nl.alpinelinux.org/alpine/edge/community" >> /etc/ap --with-file-aio \ --with-threads \ --with-pcre-jit \ + --with-ipv6 \ --without-http_ssi_module \ --without-http_scgi_module \ --without-http_uwsgi_module \ diff --git a/cowrie/Dockerfile b/cowrie/Dockerfile index 27861c0..80aa4ac 100644 --- a/cowrie/Dockerfile +++ b/cowrie/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.3 +FROM alpine:edge MAINTAINER Wonderfall ARG MPFR_VERSION=3.1.4 @@ -36,8 +36,7 @@ RUN echo "@commuedge http://nl.alpinelinux.org/alpine/edge/community" >> /etc/ap openssh-client \ tini@commuedge \ su-exec \ - && cd /tmp \ - && wget -q http://www.mpfr.org/mpfr-current/mpfr-${MPFR_VERSION}.tar.gz \ + && cd /tmp && wget -q http://www.mpfr.org/mpfr-current/mpfr-${MPFR_VERSION}.tar.gz \ && echo "Verifying authenticity of mpfr-${MPFR_VERSION}.tar.gz..." \ && wget -q http://www.mpfr.org/mpfr-current/mpfr-${MPFR_VERSION}.tar.gz.asc \ && gpg --recv-keys 98C3739D \ @@ -48,8 +47,7 @@ RUN echo "@commuedge http://nl.alpinelinux.org/alpine/edge/community" >> /etc/ap && echo "All seems good, now unpacking mpfr-${MPFR_VERSION}.tar.gz..." \ && tar xzf mpfr-${MPFR_VERSION}.tar.gz && cd mpfr-${MPFR_VERSION} \ && ./configure && make && make install \ - && cd /tmp \ - && wget -q ftp://ftp.gnu.org/gnu/mpc/mpc-${MPC_VERSION}.tar.gz \ + && cd /tmp && wget -q ftp://ftp.gnu.org/gnu/mpc/mpc-${MPC_VERSION}.tar.gz \ && echo "Verifying both integrity and authenticity of mpc-${MPC_VERSION}.tar.gz..." \ && CHECKSUM=$(sha1sum mpc-${MPC_VERSION}.tar.gz | awk '{print $1}') \ && if [ "${CHECKSUM}" != "${SHA1_MPC}" ]; then echo "Warning! Checksum does not match!" && exit 1; fi \ diff --git a/cowrie/run.sh b/cowrie/run.sh index f225fad..5f3b077 100644 --- a/cowrie/run.sh +++ b/cowrie/run.sh @@ -1,12 +1,13 @@ #!/bin/sh cd /cowrie -sed -i "s/hostname = svr04/hostname = $HOSTNAME/g" cowrie.cfg -sed -i "s/#download_limit_size = 10485760/download_limit_size = $DL_LIMIT/g" cowrie.cfg -sed -i "s/#internet_facing_ip = 9.9.9.9/internet_facing_ip = $FACING_IP/g" cowrie.cfg -if [ "$JSON_LOG" == "False" ]; then - sed -i "s/\[output_jsonlog\]/#\[output_jsonlog\]/g" cowrie.cfg - sed -i "s|logfile = log/cowrie.json|#logfile = log/cowrie.json|g" cowrie.cfg +sed -i -e "s/hostname = svr04/hostname = ${HOSTNAME}/g" \ + -e "s/#download_limit_size = 10485760/download_limit_size = ${DL_LIMIT}/g" \ + -e "s/#internet_facing_ip = 9.9.9.9/internet_facing_ip = ${FACING_IP}/g" cowrie.cfg + +if [ "${JSON_LOG}" == "False" ]; then + sed -i -e "s/\[output_jsonlog\]/#\[output_jsonlog\]/g" \ + -e "s|logfile = log/cowrie.json|#logfile = log/cowrie.json|g" cowrie.cfg fi rm twistd.pid diff --git a/isso/Dockerfile b/isso/Dockerfile index 93e1498..2750919 100644 --- a/isso/Dockerfile +++ b/isso/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.3 +FROM alpine:edge MAINTAINER Wonderfall ARG ISSO_VER=0.10.4 @@ -6,26 +6,24 @@ ARG ISSO_VER=0.10.4 ENV GID=1000 UID=1000 RUN echo "@commuedge http://nl.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories \ - && apk -U add \ - python \ + && BUILD_DEPS=" \ python-dev \ libffi-dev \ - py-setuptools \ py-pip \ + build-base" \ + && apk -U add \ + ${BUILD_DEPS} \ + python \ + py-setuptools \ sqlite \ ca-certificates \ - build-base \ su-exec \ tini@commuedge \ && pip install --no-cache cffi \ && pip install --no-cache misaka==1.0.2 \ && wget https://github.com/posativ/isso/releases/download/$ISSO_VER/isso-$ISSO_VER.tar.gz -P /tmp \ && pip install /tmp/isso-$ISSO_VER.tar.gz \ - && apk del \ - python-dev \ - libffi-dev \ - py-pip \ - build-base \ + && apk del ${BUILD_DEPS} \ && rm -rf /var/cache/apk/* /tmp/* COPY run.sh /usr/local/bin/run.sh diff --git a/nodejs/Dockerfile b/nodejs/Dockerfile index 5928ea3..9a25ee3 100644 --- a/nodejs/Dockerfile +++ b/nodejs/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.3 +FROM alpine:edge MAINTAINER Wonderfall ARG NODE_VER=4.4.5 @@ -17,6 +17,7 @@ RUN NB_CORES=${BUILD_CORES-`getconf _NPROCESSORS_CONF`} \ grep \ binutils \ binutils-gold \ + openssl \ ca-certificates" \ && apk -U add \ $BUILD_DEPS \ diff --git a/rainloop/Dockerfile b/rainloop/Dockerfile index 9fe5b0d..604e869 100644 --- a/rainloop/Dockerfile +++ b/rainloop/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.3 +FROM alpine:edge MAINTAINER Wonderfall ARG GPG_rainloop="3B79 7ECE 694F 3B7B 70F3 11A4 ED7C 49D9 87DA 4591" diff --git a/rutorrent/Dockerfile b/rutorrent/Dockerfile index 7eb8501..7dd5bd8 100644 --- a/rutorrent/Dockerfile +++ b/rutorrent/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.3 +FROM alpine:edge MAINTAINER xataz MAINTAINER Wonderfall @@ -15,7 +15,6 @@ ENV UID=991 \ RUN echo "@commuedge http://nl.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories \ && echo "@testing http://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \ - && echo "@community http://nl.alpinelinux.org/alpine/v3.3/community/" >> /etc/apk/repositories \ && NB_CORES=${BUILD_CORES-`getconf _NPROCESSORS_CONF`} \ && BUILD_DEPS=" \ build-base \ @@ -45,7 +44,7 @@ RUN echo "@commuedge http://nl.alpinelinux.org/alpine/edge/community" >> /etc/ap supervisor \ geoip \ tini@commuedge \ - openjdk8-jre@community \ + openjdk8-jre@commuedge \ && cd /tmp \ && wget -q http://downloads.sourceforge.net/mktorrent/mktorrent-1.0.tar.gz \ && tar xzvf mktorrent-1.0.tar.gz \ diff --git a/searx/Dockerfile b/searx/Dockerfile index 64eded9..7497164 100644 --- a/searx/Dockerfile +++ b/searx/Dockerfile @@ -1,49 +1,41 @@ -FROM alpine:3.3 -MAINTAINER Wonderfall +FROM alpine:edge +MAINTAINER Wonderfall ENV BASE_URL=False IMAGE_PROXY=False RUN echo "@commuedge http://nl.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories \ - && apk -U add \ + && BUILD_DEPS=" \ build-base \ - python \ python-dev \ py-pip \ - libxml2 \ - libxml2-dev \ - libxslt \ - libxslt-dev \ libffi-dev \ - openssl \ + libxslt-dev \ + libxml2-dev \ openssl-dev \ - ca-certificates \ tar \ + ca-certificates" \ + && apk -U add \ + ${BUILD_DEPS} \ + python \ + libxml2 \ + libxslt \ + openssl \ tini@commuedge \ && pip install --no-cache -r https://raw.githubusercontent.com/asciimoo/searx/master/requirements.txt \ - && apk del \ - build-base \ - python-dev \ - py-pip \ - libffi-dev \ - libxslt-dev \ - libxml2-dev \ - openssl-dev \ - ca-certificates \ + && mkdir /usr/local/searx && cd /usr/local/searx \ + && wget -qO- https://github.com/asciimoo/searx/archive/master.tar.gz | tar xz --strip 1 \ + && sed -i "s/127.0.0.1/0.0.0.0/g" searx/settings.yml \ + && adduser -D -h /usr/local/searx -s /bin/sh searx searx \ + && chown -R searx:searx /usr/local/searx \ + && apk del ${BUILD_DEPS} \ && rm -f /var/cache/apk/* -RUN adduser -D -h /usr/local/searx -s /bin/sh searx searx - COPY run.sh /usr/local/bin/run.sh RUN chmod +x /usr/local/bin/run.sh USER searx -WORKDIR /usr/local/searx - -RUN wget -qO- https://github.com/asciimoo/searx/archive/master.tar.gz | tar xz --strip 1 \ - && sed -i "s/127.0.0.1/0.0.0.0/g" searx/settings.yml - EXPOSE 8888 -LABEL description "A powerful meta-search engine" + CMD ["/sbin/tini","--","run.sh"] diff --git a/searx/run.sh b/searx/run.sh index ae97fa5..32864c0 100644 --- a/searx/run.sh +++ b/searx/run.sh @@ -1,5 +1,7 @@ #!/bin/sh -sed -i "s|base_url : False|base_url : $BASE_URL|g" searx/settings.yml -sed -i "s/image_proxy : False/image_proxy : $IMAGE_PROXY/g" searx/settings.yml -sed -i "s/ultrasecretkey/`openssl rand -hex 16`/g" searx/settings.yml -python searx/webapp.py +sed -i -e "s|base_url : False|base_url : ${BASE_URL}|g" \ + -e "s/image_proxy : False/image_proxy : ${IMAGE_PROXY}/g" \ + -e "s/ultrasecretkey/$(openssl rand -hex 16)/g" \ + /usr/local/searx/searx/settings.yml + +python /usr/local/searx/searx/webapp.py diff --git a/subsonic/Dockerfile b/subsonic/Dockerfile index 1d3321e..dc47e42 100644 --- a/subsonic/Dockerfile +++ b/subsonic/Dockerfile @@ -1,17 +1,16 @@ -FROM alpine:3.3 +FROM alpine:edge MAINTAINER Wonderfall ARG VERSION=6.0 ENV GID=991 UID=991 WORKDIR /subsonic -RUN echo "@community http://dl-4.alpinelinux.org/alpine/v3.3/community/" >> /etc/apk/repositories \ - && echo "@commuedge http://nl.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories \ +RUN echo "@commuedge http://nl.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories \ && apk -U add \ ffmpeg \ - openjdk8-jre@community \ + openjdk8-jre@commuedge \ tini@commuedge \ - && wget -qO- http://subsonic.org/download/subsonic-$VERSION-standalone.tar.gz | tar zxf - \ + && wget -qO- http://subsonic.org/download/subsonic-${VERSION}-standalone.tar.gz | tar zxf - \ && rm -f /var/cache/apk/* COPY run.sh /usr/local/bin/run.sh diff --git a/tor/Dockerfile b/tor/Dockerfile index 74426ec..381f686 100644 --- a/tor/Dockerfile +++ b/tor/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.3 +FROM alpine:edge ARG TOR_VERSION=0.2.7.6 ARG TOR_USER_ID=45553 diff --git a/zerobin/Dockerfile b/zerobin/Dockerfile index 9967d1f..9045ec5 100644 --- a/zerobin/Dockerfile +++ b/zerobin/Dockerfile @@ -1,14 +1,13 @@ -FROM alpine:3.3 +FROM alpine:edge MAINTAINER Wonderfall ENV GID=991 UID=991 RUN echo "@commuedge http://nl.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories \ && echo "@testing http://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \ - && echo "@edge http://nl.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories \ && apk -U add \ nginx \ - libwebp@edge \ + libwebp \ php7-fpm@testing \ php7-gd@testing \ php7-mcrypt@testing \ @@ -16,12 +15,13 @@ RUN echo "@commuedge http://nl.alpinelinux.org/alpine/edge/community" >> /etc/ap php7-zlib@testing \ supervisor \ tini@commuedge \ + openssl \ ca-certificates \ tar \ && mkdir zerobin && cd zerobin \ && wget -qO- https://github.com/elrido/ZeroBin/archive/master.tar.gz | tar xz --strip 1 \ && mv cfg/conf.ini.sample cfg/conf.ini \ - && apk del tar ca-certificates \ + && apk del tar openssl ca-certificates \ && rm -f /var/cache/apk/* COPY nginx.conf /etc/nginx/nginx.conf