diff --git a/redis.sh b/redis.sh index e53600e..5f452bd 100755 --- a/redis.sh +++ b/redis.sh @@ -7,6 +7,7 @@ docker build -t redis ${SOURCE_DIR} # Configure Redis mkdir -p /srv/redis cp ${SOURCE_DIR}/srv/redis/redis.conf /srv/redis/redis.conf +chown -R 6379:6379 /srv/redis # Configure Redis service cp ${SOURCE_DIR}/lib/systemd/system/redis.service /lib/systemd/system/redis.service diff --git a/redis/Dockerfile b/redis/Dockerfile index 8ea4671..15cc646 100644 --- a/redis/Dockerfile +++ b/redis/Dockerfile @@ -1,7 +1,9 @@ FROM alpine:3.7 MAINTAINER Disassembler -RUN apk --no-cache add redis +RUN addgroup -S -g 6379 redis \ + && adduser -S -u 6379 -h /var/lib/redis -s /bin/false -g redis -G redis redis \ + && apk --no-cache add redis VOLUME ["/var/lib/redis"] EXPOSE 6379 diff --git a/solr/Dockerfile b/solr/Dockerfile index 47382d7..38d6be6 100644 --- a/solr/Dockerfile +++ b/solr/Dockerfile @@ -10,7 +10,7 @@ RUN apk --no-cache add bash lsof \ && mv /opt/solr-6.5.1 /opt/solr \ && rm -f /tmp/solr-6.5.1.tgz \ && addgroup -S -g 8983 solr \ - && adduser -S -u 8983 -h /var/lib/solr -s /bin/sh -g solr -G solr solr \ + && adduser -S -u 8983 -h /var/lib/solr -s /bin/false -g solr -G solr solr \ && chown -R solr:solr /opt/solr/ \ && cp -p /opt/solr/server/solr/solr.xml /var/lib/solr/solr.xml \ && ln -s /opt/solr/bin/solr /usr/local/bin/solr