Skip to content

Commit d56a4c6

Browse files
authored
chore: use redis from upstream image (#41616)
## Description > [!TIP] > _Add a TL;DR when the description is longer than 500 words or extremely technical (helps the content, marketing, and DevRel team)._ > > _Please also include relevant motivation and context. List any dependencies that are required for this change. Add links to Notion, Figma or any other documents that might be relevant to the PR._ Even with newer packages from the Redis project, container scanners are showing false positives for vulnerabilities. Switching to use the upstream Redis built docker images instead. This bypasses scanners that look for dpkg metadata about packages, but I'm enabling docker dependency updates here via Dependabot to keep this up-to-date. Fixes #`Issue Number` _or_ Fixes `Issue URL` > [!WARNING] > _If no issue exists, please create an issue first, and check with the maintainers if the issue is valid._ ## Automation /ok-to-test tags="" ### 🔍 Cypress test results <!-- This is an auto-generated comment: Cypress test results --> > [!WARNING] > Tests have not run on the HEAD edb91ff yet > <hr>Fri, 13 Mar 2026 16:04:48 UTC <!-- end of auto-generated comment: Cypress test results --> ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [x] No <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Added automated dependency updates for Docker images. * Updated Docker build to source Redis binaries from an upstream image instead of installing them during build. * Adjusted Redis runtime configuration to remove an explicit working-directory setting. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 9e7c2bb commit d56a4c6

3 files changed

Lines changed: 17 additions & 7 deletions

File tree

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,17 @@ updates:
1414
commit-message:
1515
prefix: "chore"
1616
include: "scope"
17+
- package-ecosystem: "docker"
18+
directory: "/deploy/docker"
19+
schedule:
20+
interval: "weekly"
21+
open-pull-requests-limit: 5
22+
labels:
23+
- "dependencies"
24+
- "docker"
25+
commit-message:
26+
prefix: "chore"
27+
include: "scope"
1728
- package-ecosystem: "maven"
1829
directory: "/app/server"
1930
schedule:

deploy/docker/base.dockerfile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
FROM redis:7.4.8 AS redis-source
2+
13
FROM caddy:builder-alpine AS caddybuilder
24

35
RUN xcaddy build \
@@ -23,20 +25,15 @@ RUN set -o xtrace \
2325
ca-certificates \
2426
libnss-wrapper \
2527
git \
26-
# Install MongoDB v6, Redis 7.4 (from packages.redis.io), PostgreSQL v14
28+
# Install MongoDB v6, PostgreSQL v14
2729
&& curl -fsSL https://www.mongodb.org/static/pgp/server-6.0.asc | gpg --dearmor -o /usr/share/keyrings/mongodb-server-6.0.gpg \
2830
&& echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-6.0.gpg ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/6.0 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-6.0.list \
29-
&& curl -fsSL https://packages.redis.io/gpg | gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg \
30-
&& chmod 644 /usr/share/keyrings/redis-archive-keyring.gpg \
31-
&& echo "deb [arch=amd64,arm64 signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(. /etc/os-release && echo "$VERSION_CODENAME") main" | tee /etc/apt/sources.list.d/redis.list \
3231
&& echo "deb http://apt.postgresql.org/pub/repos/apt $(grep CODENAME /etc/lsb-release | cut -d= -f2)-pgdg main" | tee /etc/apt/sources.list.d/pgdg.list \
3332
&& curl --silent --show-error --location https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \
3433
&& apt update \
3534
&& DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --yes \
3635
mongodb-org \
37-
redis=6:7.4* redis-server=6:7.4* redis-tools=6:7.4* \
3836
postgresql-14 \
39-
&& find /etc/redis -type d -exec chmod o+rx {} + -o -type f -exec chmod o+r {} + \
4037
&& apt-get clean \
4138
&& rm -rf \
4239
/root/.cache \
@@ -47,6 +44,9 @@ RUN set -o xtrace \
4744
/var/lib/apt/lists/* \
4845
/tmp/*
4946

47+
# Install Redis from official image to avoid false positive CVE reports from dpkg-based scanners.
48+
COPY --from=redis-source /usr/local/bin/redis-server /usr/local/bin/redis-server
49+
COPY --from=redis-source /usr/local/bin/redis-cli /usr/local/bin/redis-cli
5050
ENV PATH="/usr/lib/postgresql/14/bin:${PATH}"
5151

5252
# Install Java

deploy/docker/fs/opt/appsmith/templates/supervisord/redis.conf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
[program:redis]
2-
directory=/etc/redis
32
; The `--save` is for saving session data to disk more often, so recent sessions aren't cleared on restart.
43
; The empty string to `--logfile` is for logging to stdout so that supervisor can capture it.
54
command=redis-server --save 15 1 --dir /appsmith-stacks/data/redis --daemonize no --logfile ""

0 commit comments

Comments
 (0)