Skip to content

Commit

Permalink
remove redis reff, limit build push wf to run only on push
Browse files Browse the repository at this point in the history
Signed-off-by: Roshan Khatri <rvkhatri@amazon.com>
  • Loading branch information
roshkhatri committed Apr 3, 2024
1 parent 896df05 commit 77fafa2
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 21 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ jobs:
run: ${{ matrix.runs.images }}

build_and_push:
if: github.event_name == 'push'
needs:
- generate-jobs
- test
Expand Down
7 changes: 2 additions & 5 deletions Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 \
Expand Down
2 changes: 0 additions & 2 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 2 additions & 5 deletions unstable/alpine/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions unstable/alpine/docker-entrypoint.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 2 additions & 5 deletions unstable/debian/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions unstable/debian/docker-entrypoint.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 77fafa2

Please sign in to comment.