Add UID/GID for Redis

This commit is contained in:
Disassembler 2017-12-13 16:06:31 +01:00
parent cfdbb2c609
commit d973836b8c
3 changed files with 5 additions and 2 deletions

View File

@ -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

View File

@ -1,7 +1,9 @@
FROM alpine:3.7
MAINTAINER Disassembler <disassembler@dasm.cz>
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

View File

@ -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