From e0f2a3d5ce81cff594a4cd7786f90e0c526fbac3 Mon Sep 17 00:00:00 2001 From: Wenkai Yin Date: Fri, 13 Jul 2018 13:48:50 +0800 Subject: [PATCH] Fix permission deny issue when Redis starting This commit changes the ownership of directory that Redis uses to user redis when starting up --- make/photon/redis/Dockerfile | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/make/photon/redis/Dockerfile b/make/photon/redis/Dockerfile index 562e41973..9b75db19b 100644 --- a/make/photon/redis/Dockerfile +++ b/make/photon/redis/Dockerfile @@ -1,12 +1,10 @@ FROM vmware/photon:1.0 RUN tdnf distro-sync -y \ - && tdnf install -y redis sudo \ - && mkdir /data \ - && chown redis:redis /data + && tdnf install -y redis sudo -VOLUME /data -WORKDIR /data +VOLUME /var/lib/redis +WORKDIR /var/lib/redis COPY docker-entrypoint.sh /usr/bin/ COPY redis.conf /etc/redis.conf RUN chmod +x /usr/bin/docker-entrypoint.sh \