Reorganize Dockerfiles

This commit is contained in:
Disassembler 2018-01-08 21:04:35 +01:00
parent d32573974b
commit ed66c4b705
9 changed files with 62 additions and 28 deletions

View File

@ -11,9 +11,11 @@ RUN \
RUN \
# Install runtime dependencies
apk --no-cache add libffi libressl libxml2 libxslt uwsgi-python \
apk --no-cache add libffi libressl uwsgi-python
RUN \
# Install build dependencies
&& apk --no-cache add --virtual .deps build-base git libffi-dev libressl-dev libxml2-dev libxslt-dev py2-pip python2-dev \
apk --no-cache add --virtual .deps build-base git libffi-dev libressl-dev libxml2-dev libxslt-dev py2-pip python2-dev \
# Install CKAN DataPusher
&& mkdir -p /srv/ckan-datapusher \
&& cd /srv/ckan-datapusher \

View File

@ -11,9 +11,11 @@ RUN \
RUN \
# Install runtime dependencies
apk --no-cache add libjpeg-turbo libmagic libpq py2-pip zlib \
apk --no-cache add libjpeg-turbo libmagic libpq py2-pip zlib
RUN \
# Install build dependencies
&& apk --no-cache add --virtual .deps git build-base libjpeg-turbo-dev libxml2-dev libxslt-dev postgresql-dev python2-dev zlib-dev \
apk --no-cache add --virtual .deps git build-base libjpeg-turbo-dev libxml2-dev libxslt-dev postgresql-dev python2-dev zlib-dev \
# Add edge/testing repository for postgis (geos) support
&& echo 'http://dl-cdn.alpinelinux.org/alpine/edge/testing' >>/etc/apk/repositories \
&& apk --no-cache add geos \

View File

@ -1,9 +1,19 @@
FROM alpine:3.7
MAINTAINER Disassembler <disassembler@dasm.cz>
RUN \
# Install NodeJS runtime
apk --no-cache add nodejs paxctl \
# Fix grsec attributes to loosen memory protection restrictions
&& paxctl -cm /usr/bin/node \
# Cleanup
&& apk del paxctl
RUN \
# Install Ruby runtime dependencies
apk --no-cache add gdbm libressl readline zlib \
apk --no-cache add gdbm libressl readline zlib
RUN \
# Install Ruby build dependencies
&& apk --no-cache add --virtual .deps build-base autoconf gdbm-dev libressl-dev linux-headers readline-dev zlib-dev \
# Download and unpack Ruby
@ -27,7 +37,7 @@ RUN \
# Cleanup
&& cd /tmp \
&& rm -r /usr/src/ruby \
&& apk --no-cache del .deps \
&& apk del .deps \
&& rm -rf /root \
&& mkdir /root
@ -35,11 +45,11 @@ ENV RAILS_ENV production
RUN \
# Install runtime dependencies
apk --no-cache add libpq libxml2 libxslt nodejs tzdata \
apk --no-cache add libpq libxml2 libxslt tzdata
RUN \
# Install build dependencies
&& apk --no-cache add --virtual .deps build-base git libxml2-dev libxslt-dev linux-headers paxctl postgresql-dev yarn zlib-dev \
# Fix grsec attributes to loosen memory protection restrictions
&& paxctl -cm /usr/bin/node \
apk --no-cache add --virtual .deps build-base git libxml2-dev libxslt-dev linux-headers postgresql-dev yarn zlib-dev \
# Clone CrisisCleanup
&& git clone --depth 1 https://github.com/CrisisCleanup/crisiscleanup /srv/crisiscleanup \
# Hackfix ruby dependency versions
@ -60,7 +70,7 @@ RUN \
&& adduser -S -u 8005 -h /srv/crisiscleanup -s /bin/false -g crisiscleanup -G crisiscleanup crisiscleanup \
&& chown -R crisiscleanup:crisiscleanup /srv/crisiscleanup \
# Cleanup
&& apk --no-cache del .deps \
&& apk del .deps \
&& rm -rf /srv/crisiscleanup/.git* \
&& rm -rf /usr/local/share/.cache \
&& rm -rf /root \

View File

@ -7,9 +7,11 @@ RUN \
RUN \
# Install runtime dependencies
apk --no-cache add libpq zlib \
apk --no-cache add libpq zlib
RUN \
# Install build dependencies
&& apk --no-cache add --virtual .deps git build-base postgresql-dev python2-dev py2-pip zlib-dev \
apk --no-cache add --virtual .deps git build-base postgresql-dev python2-dev py2-pip zlib-dev \
# Add edge/testing repository for postgis (geos) support
&& echo 'http://dl-cdn.alpinelinux.org/alpine/edge/testing' >>/etc/apk/repositories \
&& apk --no-cache add geos \

View File

@ -11,9 +11,11 @@ RUN \
RUN \
# Install runtime dependencies
apk --no-cache add bash coreutils libffi libjpeg-turbo libpq nodejs \
apk --no-cache add bash coreutils libffi libjpeg-turbo libpq nodejs
RUN \
# Install build dependencies
&& apk --no-cache add --virtual .deps build-base git libffi-dev libjpeg-turbo-dev libxml2-dev libxslt-dev ncurses patch postgresql-dev python3-dev sudo \
apk --no-cache add --virtual .deps build-base git libffi-dev libjpeg-turbo-dev libxml2-dev libxslt-dev ncurses patch postgresql-dev python3-dev sudo \
# Download GNU Health
&& wget http://ftp.gnu.org/gnu/health/gnuhealth-3.2.8.tar.gz -O /tmp/gnuhealth.tgz \
&& tar xzf /tmp/gnuhealth.tgz -C /srv \

View File

@ -5,8 +5,6 @@ RUN \
# Install PHP runtime
apk --no-cache add nginx php7-fpm s6
COPY docker/ /
RUN \
# Install runtime dependencies
apk --no-cache add php7 php7-ctype php7-dom php7-gd php7-iconv php7-json php7-mbstring php7-mcrypt php7-opcache php7-openssl php7-pdo_pgsql php7-posix php7-session php7-simplexml php7-sockets php7-xml php7-zip php7-zlib
@ -40,6 +38,8 @@ RUN \
&& rm -rf /root \
&& mkdir /root
COPY docker/ /
VOLUME ["/srv/kanboard/app/data"]
EXPOSE 8009

View File

@ -1,17 +1,30 @@
FROM alpine:3.7
MAINTAINER Disassembler <disassembler@dasm.cz>
RUN \
# Install Java 1.8 JRE
apk --no-cache add openjdk8-jre-base paxctl \
# Fix grsec attributes to loosen memory protection restrictions
&& paxctl -cm /usr/lib/jvm/java-1.8-openjdk/jre/bin/java \
&& paxctl -cm /usr/lib/jvm/java-1.8-openjdk/bin/java \
# Cleanup
&& apk del paxctl
RUN \
# Install NodeJS runtime
apk --no-cache add nodejs paxctl \
# Fix grsec attributes to loosen memory protection restrictions
&& paxctl -cm /usr/bin/node \
# Cleanup
&& apk del paxctl
RUN \
# Install Python2 runtime
apk --no-cache add python2
RUN \
# Install runtime dependencies
apk --no-cache add nodejs openjdk8-jre-base \
# Install build dependencies
&& apk --no-cache add --virtual .deps git build-base paxctl py2-pip yarn \
# Fix grsec attributes to loosen memory protection restrictions
&& paxctl -cm /usr/bin/node \
apk --no-cache add --virtual .deps git build-base py2-pip yarn \
# Clone OpenMapKit
&& git clone --depth 1 https://github.com/AmericanRedCross/OpenMapKitServer /srv/openmapkit \
&& cd /srv/openmapkit \
@ -25,7 +38,7 @@ RUN \
&& adduser -S -u 8007 -h /srv/openmapkit -s /bin/false -g omk -G omk omk \
&& chown -R omk:omk /srv/openmapkit \
# Cleanup
&& apk --no-cache del .deps \
&& apk del .deps \
&& rm -rf /srv/openmapkit/.git* /srv/openmapkit/api/odk/pyxform/.git* \
&& rm -rf /usr/local/share/.cache \
&& rm -rf /root \

View File

@ -7,9 +7,11 @@ RUN \
RUN \
# Install runtime dependencies
apk --no-cache add ghostscript imagemagick libreoffice-calc libreoffice-impress libreoffice-writer php7-gd php7-iconv php7-json php7-mbstring php7-pear php7-pdo_pgsql php7-simplexml php7-xml poppler-utils \
apk --no-cache add ghostscript imagemagick libreoffice-calc libreoffice-impress libreoffice-writer php7-gd php7-iconv php7-json php7-mbstring php7-pear php7-pdo_pgsql php7-simplexml php7-xml poppler-utils
RUN \
# Install unoconv
&& wget https://raw.githubusercontent.com/dagwieers/unoconv/master/unoconv -O /usr/local/bin/unoconv \
wget https://raw.githubusercontent.com/dagwieers/unoconv/master/unoconv -O /usr/local/bin/unoconv \
&& chmod +x /usr/local/bin/unoconv \
&& ln -s /usr/bin/python3 /usr/bin/python

View File

@ -1,7 +1,6 @@
FROM alpine:3.7
MAINTAINER Disassembler <disassembler@dasm.cz>
RUN \
# Install Java 1.8 JRE
apk --no-cache add openjdk8-jre-base paxctl \
@ -13,9 +12,11 @@ RUN \
RUN \
# Install runtime dependencies
apk --no-cache add bash lsof \
apk --no-cache add bash lsof
RUN \
# Download and install Solr
&& wget http://archive.apache.org/dist/lucene/solr/6.5.1/solr-6.5.1.tgz -O /tmp/solr-6.5.1.tgz \
wget http://archive.apache.org/dist/lucene/solr/6.5.1/solr-6.5.1.tgz -O /tmp/solr-6.5.1.tgz \
&& mkdir /opt \
&& tar xzf /tmp/solr-6.5.1.tgz -C /opt/ \
&& mv /opt/solr-6.5.1 /opt/solr \