Skip to content

Commit

Permalink
Disable protected-mode in valkey
Browse files Browse the repository at this point in the history
upstream does this by recompiling valkey which is not something
that we can easily do. let's see how far we'll get by patching
the configuration file.
  • Loading branch information
dirkmueller committed Dec 3, 2024
1 parent 7749907 commit d20c2a7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/bci_build/package/valkey.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@
)
],
license="BSD-3-Clause",
package_list=["valkey"],
package_list=["valkey", "sed"],
entrypoint=["/usr/bin/valkey-server"],
cmd=["/etc/valkey/valkey.conf"],
entrypoint_user="valkey",
exposes_ports=[TCP(6379)],
volumes=["/data"],
Expand All @@ -49,6 +50,7 @@
),
custom_end=textwrap.dedent(
f"""
{DOCKERFILE_RUN} sed -e 's/^protected-mode yes/protected-mode no/' -e 's/^bind .*//' < /etc/valkey/default.conf.example > /etc/valkey/valkey.conf
{DOCKERFILE_RUN} install -o valkey -g valkey -m 750 -d /data
WORKDIR /data
"""
Expand Down

0 comments on commit d20c2a7

Please sign in to comment.