Add Postgres, Redis, Solr Dockerfile comments

This commit is contained in:
Disassembler 2017-12-21 10:39:07 +01:00
parent 728ad4f4ec
commit fcba872d75
3 changed files with 23 additions and 4 deletions

View File

@ -1,10 +1,15 @@
FROM alpine:3.7
MAINTAINER Disassembler <disassembler@dasm.cz>
RUN sed -i 's/postgres:x:70:70/postgres:x:5432:5432/' /etc/passwd \
RUN \
# Modify OS user (which will be picked up later by apk add)
sed -i 's/postgres:x:70:70/postgres:x:5432:5432/' /etc/passwd \
&& sed -i 's/postgres:x:70/postgres:x:5432/' /etc/group \
# Add edge/testing repository for postgis support
&& echo 'http://repository.fit.cvut.cz/mirrors/alpine/edge/testing' >>/etc/apk/repositories \
# Install PostgreSQL + PostGIS
&& apk --no-cache add postgresql postgresql-contrib postgis \
# Create socket directory
&& mkdir /run/postgresql \
&& chown postgres:postgres /run/postgresql

View File

@ -1,8 +1,11 @@
FROM alpine:3.7
MAINTAINER Disassembler <disassembler@dasm.cz>
RUN addgroup -S -g 6379 redis \
RUN \
# Create OS user (which will be picked up later by apk add)
addgroup -S -g 6379 redis \
&& adduser -S -u 6379 -h /var/lib/redis -s /bin/false -g redis -G redis redis \
# Install Redis
&& apk --no-cache add redis
VOLUME ["/var/lib/redis"]

View File

@ -1,21 +1,32 @@
FROM alpine:3.7
MAINTAINER Disassembler <disassembler@dasm.cz>
RUN apk --no-cache add openjdk8-jre-base paxctl \
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 apk --no-cache add bash lsof \
RUN \
# Install runtime dependencies
apk --no-cache add bash lsof \
# 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 \
&& mkdir /opt \
&& tar xzf /tmp/solr-6.5.1.tgz -C /opt/ \
&& mv /opt/solr-6.5.1 /opt/solr \
&& rm -f /tmp/solr-6.5.1.tgz \
# Create OS user
&& addgroup -S -g 8983 solr \
&& adduser -S -u 8983 -h /var/lib/solr -s /bin/false -g solr -G solr solr \
&& chown -R solr:solr /opt/solr/ \
# Copy basic configuration file to data location
&& cp -p /opt/solr/server/solr/solr.xml /var/lib/solr/solr.xml \
# Make start/stop script visible globally
&& ln -s /opt/solr/bin/solr /usr/local/bin/solr
VOLUME ["/var/lib/solr"]