Skip to content

Dockerfile can also build redis modules#103

Open
lilatomic wants to merge 6 commits intoOT-CONTAINER-KIT:masterfrom
lilatomic:feature/modules
Open

Dockerfile can also build redis modules#103
lilatomic wants to merge 6 commits intoOT-CONTAINER-KIT:masterfrom
lilatomic:feature/modules

Conversation

@lilatomic
Copy link

Redis includes several modules. The standard image does not include them.
This MR adds the capability for the Dockerfile to also build with modules. This allows for building images with or without the modules.

relates to OT-CONTAINER-KIT/redis-operator#1560

Dockerfile Outdated

COPY --from=builder /usr/local/bin/redis-server /usr/local/bin/redis-server
COPY --from=builder /usr/local/bin/redis-cli /usr/local/bin/redis-cli
COPY --from=builder /tmp/redis-stable/modules/*/*.so /modules/
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/tmp/redis-stable/modules//.so should like /tmp/redis-${VERSION}/modules//.so

@raoganeshr
Copy link

@lilatomic are you planning to update as per review comments and submit?

@lilatomic
Copy link
Author

ah, I missed this! I've made the change and am testing it now.

Signed-off-by: Daniel Goldman <danielgoldman4@gmail.com>
Signed-off-by: Daniel Goldman <danielgoldman4@gmail.com>
Signed-off-by: Daniel Goldman <danielgoldman4@gmail.com>
Signed-off-by: Daniel Goldman <danielgoldman4@gmail.com>
Redis > 8.2 wasn't building correctly.
Initially I was hitting an error about `if let`:

> `let` expressions in this position are unstable

in the `wildcard` transitive dependency of redisearch.

I upgraded the version of alpine used to get a more recent Rust toolchain which stabilised that syntax.

This caused another error because the llvm-dev package dropped the `/usr/bin/llvm-config` binary,
instead only including the binary with the version attached. (issue)[https://gitlab.alpinelinux.org/alpine/aports/-/work_items/17773].
The fix for that is in, but I wasn't getting it in the package archive.
So I added a check that sets the correct envvar.

Signed-off-by: Daniel Goldman <danielgoldman4@gmail.com>
@lilatomic
Copy link
Author

I hit some problems building the latest version of redis ("stable" is fine, 8.4 was not). I added the fixes in the last commit. You or I could drop/cherry-pick the commit if you'd rather that happen in a separate MR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants