Merge branch 'master' into job_service

This commit is contained in:
Steven Zou 2018-03-30 11:23:20 +08:00
commit d5a696d821
3 changed files with 1323 additions and 0 deletions

View File

@ -0,0 +1,17 @@
FROM vmware/photon:1.0
RUN tdnf distro-sync -y \
&& tdnf install -y redis sudo \
&& mkdir /data \
&& chown redis:redis /data
VOLUME /data
WORKDIR /data
COPY docker-entrypoint.sh /usr/bin/
COPY redis.conf /etc/redis.conf
RUN chmod +x /usr/bin/docker-entrypoint.sh \
&& chown redis:redis /etc/redis.conf
ENTRYPOINT ["docker-entrypoint.sh"]
EXPOSE 6379
CMD ["redis-server", "/etc/redis.conf"]

View File

@ -0,0 +1,13 @@
#!/bin/sh
set -e
if [ "${1#-}" != "$1" ] || [ "${1%.conf}" != "$1" ]; then
set -- redis-server "$@"
fi
if [ "$1" = 'redis-server' -a "$(id -u)" = '0' ]; then
chown -R redis .
exec sudo -u redis "$@"
fi
exec "$@"

1293
make/photon/redis/redis.conf Normal file

File diff suppressed because it is too large Load Diff