diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bd5a094..fd8afe3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,6 +48,7 @@ jobs: run: ${{ matrix.runs.images }} build_and_push: + if: github.event_name == 'push' needs: - generate-jobs - test diff --git a/Dockerfile.template b/Dockerfile.template index 92cf82c..7ea1334 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -164,14 +164,12 @@ RUN set -eux; \ tar -xzf valkey.tar.gz -C /usr/src/valkey --strip-components=1; \ rm valkey.tar.gz; \ \ -# disable Redis protected mode [1] as it is unnecessary in context of Docker +# disable Valkey 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/redis/redis/commit/edd4d555df57dc84265fdfb4ef59a4678832f6da grep -E '^ *createBoolConfig[(]"protected-mode",.*, *1 *,.*[)],$' /usr/src/valkey/src/config.c; \ sed -ri 's!^( *createBoolConfig[(]"protected-mode",.*, *)1( *,.*[)],)$!\10\2!' /usr/src/valkey/src/config.c; \ grep -E '^ *createBoolConfig[(]"protected-mode",.*, *0 *,.*[)],$' /usr/src/valkey/src/config.c; \ -# 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 +# 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 valkey-server, [it assumes] you are going to specify everything" # (more exactly, this makes sure the default behavior of "save on SIGTERM" stays functional by default) \ # https://github.com/jemalloc/jemalloc/issues/467 -- we need to patch the "./configure" for the bundled jemalloc to match how Debian compiles, for compatibility @@ -193,7 +191,6 @@ RUN set -eux; \ make -C /usr/src/valkey -j "$(nproc)" all; \ make -C /usr/src/valkey install; \ \ -# TODO https://github.com/redis/redis/pull/3494 (deduplicate "redis-server" copies) serverMd5="$(md5sum /usr/local/bin/valkey-server | cut -d' ' -f1)"; export serverMd5; \ find /usr/local/bin/valkey* -maxdepth 0 \ -type f -not -name valkey-server \ diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 0f12c3d..249537b 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -14,8 +14,6 @@ if [ "$1" = 'valkey-server' -a "$(id -u)" = '0' ]; then fi # set an appropriate umask (if one isn't set already) -# - https://github.com/docker-library/redis/issues/305 -# - https://github.com/redis/redis/blob/bb875603fb7ff3f9d19aad906bd45d7db98d9a39/utils/systemd-redis_server.service#L37 um="$(umask)" if [ "$um" = '0022' ]; then umask 0077 diff --git a/unstable/alpine/Dockerfile b/unstable/alpine/Dockerfile index e733ba5..bdc82e4 100644 --- a/unstable/alpine/Dockerfile +++ b/unstable/alpine/Dockerfile @@ -77,14 +77,12 @@ RUN set -eux; \ tar -xzf valkey.tar.gz -C /usr/src/valkey --strip-components=1; \ rm valkey.tar.gz; \ \ -# disable Redis protected mode [1] as it is unnecessary in context of Docker +# disable Valkey 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/redis/redis/commit/edd4d555df57dc84265fdfb4ef59a4678832f6da grep -E '^ *createBoolConfig[(]"protected-mode",.*, *1 *,.*[)],$' /usr/src/valkey/src/config.c; \ sed -ri 's!^( *createBoolConfig[(]"protected-mode",.*, *)1( *,.*[)],)$!\10\2!' /usr/src/valkey/src/config.c; \ grep -E '^ *createBoolConfig[(]"protected-mode",.*, *0 *,.*[)],$' /usr/src/valkey/src/config.c; \ -# 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 +# 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 valkey-server, [it assumes] you are going to specify everything" # (more exactly, this makes sure the default behavior of "save on SIGTERM" stays functional by default) \ # https://github.com/jemalloc/jemalloc/issues/467 -- we need to patch the "./configure" for the bundled jemalloc to match how Debian compiles, for compatibility @@ -106,7 +104,6 @@ RUN set -eux; \ make -C /usr/src/valkey -j "$(nproc)" all; \ make -C /usr/src/valkey install; \ \ -# TODO https://github.com/redis/redis/pull/3494 (deduplicate "redis-server" copies) serverMd5="$(md5sum /usr/local/bin/valkey-server | cut -d' ' -f1)"; export serverMd5; \ find /usr/local/bin/valkey* -maxdepth 0 \ -type f -not -name valkey-server \ diff --git a/unstable/alpine/docker-entrypoint.sh b/unstable/alpine/docker-entrypoint.sh index 0f12c3d..249537b 100755 --- a/unstable/alpine/docker-entrypoint.sh +++ b/unstable/alpine/docker-entrypoint.sh @@ -14,8 +14,6 @@ if [ "$1" = 'valkey-server' -a "$(id -u)" = '0' ]; then fi # set an appropriate umask (if one isn't set already) -# - https://github.com/docker-library/redis/issues/305 -# - https://github.com/redis/redis/blob/bb875603fb7ff3f9d19aad906bd45d7db98d9a39/utils/systemd-redis_server.service#L37 um="$(umask)" if [ "$um" = '0022' ]; then umask 0077 diff --git a/unstable/debian/Dockerfile b/unstable/debian/Dockerfile index 0a961dd..5af1548 100644 --- a/unstable/debian/Dockerfile +++ b/unstable/debian/Dockerfile @@ -83,14 +83,12 @@ RUN set -eux; \ tar -xzf valkey.tar.gz -C /usr/src/valkey --strip-components=1; \ rm valkey.tar.gz; \ \ -# disable Redis protected mode [1] as it is unnecessary in context of Docker +# disable Valkey 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/redis/redis/commit/edd4d555df57dc84265fdfb4ef59a4678832f6da grep -E '^ *createBoolConfig[(]"protected-mode",.*, *1 *,.*[)],$' /usr/src/valkey/src/config.c; \ sed -ri 's!^( *createBoolConfig[(]"protected-mode",.*, *)1( *,.*[)],)$!\10\2!' /usr/src/valkey/src/config.c; \ grep -E '^ *createBoolConfig[(]"protected-mode",.*, *0 *,.*[)],$' /usr/src/valkey/src/config.c; \ -# 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 +# 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 valkey-server, [it assumes] you are going to specify everything" # (more exactly, this makes sure the default behavior of "save on SIGTERM" stays functional by default) \ # https://github.com/jemalloc/jemalloc/issues/467 -- we need to patch the "./configure" for the bundled jemalloc to match how Debian compiles, for compatibility @@ -112,7 +110,6 @@ RUN set -eux; \ make -C /usr/src/valkey -j "$(nproc)" all; \ make -C /usr/src/valkey install; \ \ -# TODO https://github.com/redis/redis/pull/3494 (deduplicate "redis-server" copies) serverMd5="$(md5sum /usr/local/bin/valkey-server | cut -d' ' -f1)"; export serverMd5; \ find /usr/local/bin/valkey* -maxdepth 0 \ -type f -not -name valkey-server \ diff --git a/unstable/debian/docker-entrypoint.sh b/unstable/debian/docker-entrypoint.sh index 0f12c3d..249537b 100755 --- a/unstable/debian/docker-entrypoint.sh +++ b/unstable/debian/docker-entrypoint.sh @@ -14,8 +14,6 @@ if [ "$1" = 'valkey-server' -a "$(id -u)" = '0' ]; then fi # set an appropriate umask (if one isn't set already) -# - https://github.com/docker-library/redis/issues/305 -# - https://github.com/redis/redis/blob/bb875603fb7ff3f9d19aad906bd45d7db98d9a39/utils/systemd-redis_server.service#L37 um="$(umask)" if [ "$um" = '0022' ]; then umask 0077