You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are 6 VMs running Docker Redis 4.0.8 containers. We modified the Dockerfile to install ruby and also to include the redis-trib.rb file (see below). We use Ansible scripts to deploy the images to each of the clusters; however, when we run our Ansible playbook to configure the cluster, this task fails:
############## Dockerfile for the base image, there is another file that is FROM this file which includes the redis.conf file and that is used to build the image that is actually deployed #######################
# This is a base image from which other Dockerfiles inherit.FROM alpine:3.7
MAINTAINER xxxxxxxxxxxxxxxxxxxxxxx
# add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added# RUN addgroup -S redis && adduser -S -G redis redisRUN addgroup -g 4640 -S redis && adduser -u 4640 -S -G redis redis
# grab su-exec for easy step-down from rootRUN apk add --no-cache 'su-exec>=0.2'ENV REDIS_VERSION 4.0.8
ENV REDIS_DOWNLOAD_URL http://download.redis.io/releases/redis-4.0.8.tar.gz
ENV REDIS_DOWNLOAD_SHA ff0c38b8c156319249fec61e5018cf5b5fe63a65b61690bec798f4c998c232ad
# for redis-sentinel see: http://redis.io/topics/sentinelRUN set -ex; \
\
apk add --no-cache --virtual .build-deps \
coreutils \
gcc \
linux-headers \
make \
musl-dev \
; \
\
wget -O redis.tar.gz "$REDIS_DOWNLOAD_URL"; \
echo "$REDIS_DOWNLOAD_SHA *redis.tar.gz" | sha256sum -c -; \
mkdir -p /usr/src/redis; \
tar -xzf redis.tar.gz -C /usr/src/redis --strip-components=1; \
rm redis.tar.gz; \
\
# disable Redis protected mode [1] as it is unnecessary in context of Docker# (ports are not automatically exposed when running inside Docker, but rather explicitly by specifying -p / -P)# [1]: https://github.com/antirez/redis/commit/edd4d555df57dc84265fdfb4ef59a4678832f6da
grep -q '^#define CONFIG_DEFAULT_PROTECTED_MODE 1$' /usr/src/redis/src/server.h; \
sed -ri 's!^(#define CONFIG_DEFAULT_PROTECTED_MODE) 1$!\1 0!' /usr/src/redis/src/server.h; \
grep -q '^#define CONFIG_DEFAULT_PROTECTED_MODE 0$' /usr/src/redis/src/server.h; \
# for future reference, we modify this directly in the source instead of just supplying a default configuration flag because apparently "if you specify any argument to redis-server, [it assumes] you are going to specify everything"# see also https://github.com/docker-library/redis/issues/4#issuecomment-50780840# (more exactly, this makes sure the default behavior of "save on SIGTERM" stays functional by default)
\
make -C /usr/src/redis -j "$(nproc)"; \
make -C /usr/src/redis install; \
rm -r /usr/src/redis; \
\
runDeps="$( \ scanelf --needed --nobanner --format '%n#p' --recursive /usr/local \ | tr ',' '\n' \ | sort -u \ | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \ )"; \
apk add --virtual .redis-rundeps $runDeps; \
apk del .build-deps; \
\
apk add --update \
ca-certificates \
ruby \
; \
rm -fr /usr/share/ri; \
gem install --no-ri --no-rdoc redis; \
\
redis-server --version
RUN chown redis:redis /usr/bin/ruby
RUN chmod a+x /usr/bin/ruby
ENV PATH /usr/bin/ruby:$PATH
RUN mkdir /data && chown redis:redis /data
VOLUME /data
WORKDIR /data
COPY bin/* /usr/local/bin/
RUN chmod a+x /usr/local/bin/redis-trib.rb
RUN chmod a+x /usr/local/bin/docker-entrypoint.sh
ENTRYPOINT ["docker-entrypoint.sh"]
EXPOSE 6379
# run redis as a non-privileged userUSER redis
# This image does not contain a redis.conf configuration file# Derived images must provide a redis.conf via COPY in their Dockerfile for this CMD to workCMD ["redis-server","/usr/local/etc/redis.conf"]
The text was updated successfully, but these errors were encountered:
There are 6 VMs running Docker Redis 4.0.8 containers. We modified the Dockerfile to install ruby and also to include the redis-trib.rb file (see below). We use Ansible scripts to deploy the images to each of the clusters; however, when we run our Ansible playbook to configure the cluster, this task fails:
It fails with the following error:
############## Dockerfile for the base image, there is another file that is FROM this file which includes the redis.conf file and that is used to build the image that is actually deployed #######################
The text was updated successfully, but these errors were encountered: