Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 81 additions & 0 deletions 9.2/alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#

FROM docker.io/valkey/valkey:9.2.0-rc1-alpine AS build

ARG SERVER_VERSION=9.2.0-rc1

RUN set -eux; \
apk add --no-cache \
ca-certificates \
build-base \
cmake \
git \
curl \
clang \
clang-dev \
gtest-dev \
ninja-build \
ninja-is-really-ninja \
openssl-dev \
clang-extra-tools \
linux-headers \
bash \
pkgconfig \
;\
update-ca-certificates; \
ln -s /usr/lib/ninja-build/bin/ninja /usr/bin/ninja-build;

# Install Rust
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y;
ENV PATH="/root/.cargo/bin:${PATH}"

WORKDIR /opt

# Clone repositories
RUN set -eux; \
git clone --depth 1 --branch 1.0.3 https://github.com/valkey-io/valkey-json.git; \
git clone --depth 1 --branch 1.0.1 https://github.com/valkey-io/valkey-bloom.git; \
git clone --depth 1 --branch 1.2.1 https://github.com/valkey-io/valkey-search.git; \
git clone --depth 1 --branch 1.1.1 https://github.com/valkey-io/valkey-ldap.git;

# Build JSON module
WORKDIR /opt/valkey-json
RUN set -eux; \
SERVER_VERSION=9.2 ./build.sh --release

# Build Bloom module
WORKDIR /opt/valkey-bloom
RUN RUSTFLAGS="-C target-feature=-crt-static" cargo build --all --all-targets --release;

# Build Search module
WORKDIR /opt/valkey-search
# TODO: Remove the sed workaround once valkey-search 1.0.x includes the CMAKE_POLICY_VERSION_MINIMUM fix (see https://github.com/valkey-io/valkey-search/pull/626)
RUN set -eux; \
sed -i 's/-DCMAKE_CXX_STANDARD=20"/-DCMAKE_CXX_STANDARD=20 -DCMAKE_POLICY_VERSION_MINIMUM=3.5"/' submodules/CMakeLists.txt; \
./build.sh

# Build LDAP module
WORKDIR /opt/valkey-ldap
RUN RUSTFLAGS="-C target-feature=-crt-static" cargo build --all --all-targets --release;

FROM docker.io/valkey/valkey:9.2.0-rc1-alpine

RUN set -eux; \
apk add --no-cache libstdc++; \
mkdir -p /usr/lib/valkey;

# Copy built modules from the build stage
COPY --from=build /opt/valkey-json/build/src/libjson.so /usr/lib/valkey/libjson.so
COPY --from=build /opt/valkey-bloom/target/release/libvalkey_bloom.so /usr/lib/valkey/libvalkey_bloom.so
COPY --from=build /opt/valkey-search/.build-release/libsearch.so /usr/lib/valkey/libsearch.so
COPY --from=build /opt/valkey-ldap/target/release/libvalkey_ldap.so /usr/lib/valkey/libvalkey_ldap.so

COPY bundle-docker-entrypoint.sh /usr/local/bin/
ENTRYPOINT ["bundle-docker-entrypoint.sh"]

EXPOSE 6379
CMD ["valkey-server"]
54 changes: 54 additions & 0 deletions 9.2/alpine/bundle-docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#!/bin/sh
set -e

MODULE_DIR="/usr/lib/valkey"
MODULE_ARGS=""
CONFIG=""

# Check if the arguments list have a config file (`something.conf`)
for arg in "${@}"; do
if [ "${arg%.conf}" != "$arg" ]; then
CONFIG="${arg}"
fi
done

# Auto-discover and append all .so modules in MODULE_DIR
for module in "$MODULE_DIR"/*.so; do
if [ "${CONFIG}" != "" ] && [ -n "$(grep "loadmodule $module" "${CONFIG}")" ]; then
# skipping `loadmodule` flag due to being already present in config file
continue
fi
if [ -f "$module" ]; then
MODULE_ARGS="$MODULE_ARGS --loadmodule $module"
fi
done

# Optional: Add extra flags via env var (e.g., logging, maxmemory, etc.)
EXTRA_ARGS="${VALKEY_EXTRA_FLAGS:-}"

# If explicitly calling valkey-server and running as root, drop privileges
if [ "$1" = 'valkey-server' ] && [ "$(id -u)" = '0' ]; then
find . \! -user valkey -exec chown valkey '{}' +
exec setpriv --reuid=valkey --regid=valkey --clear-groups -- "$0" "$@"
fi

# Set a restrictive umask if not already set
um="$(umask)"
if [ "$um" = '0022' ]; then
umask 0077
fi

# first arg is `-f` or `--some-option`
# or first arg is `something.conf`
if [ "${1#-}" != "$1" ] || [ "${1%.conf}" != "$1" ]; then
set -- valkey-server "$@"
fi

# If explicitly calling valkey-server, append modules and extra args
if [ "$1" = "valkey-server" ]; then
shift
exec valkey-server "$@" $MODULE_ARGS $EXTRA_ARGS
fi

# Else, run the provided command (e.g., bash)
exec "$@" $VALKEY_EXTRA_FLAGS
80 changes: 80 additions & 0 deletions 9.2/debian/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#

FROM docker.io/valkey/valkey:9.2.0-rc1-trixie AS build

ARG SERVER_VERSION=9.2.0-rc1

RUN set -eux; \
\
apt-get update; \
apt-get install -y --no-install-recommends \
ca-certificates \
build-essential \
cmake \
git \
curl \
clang \
clangd \
g++ \
libgtest-dev \
ninja-build \
libssl-dev \
clang-tidy \
clang-format \
libsystemd-dev \
pkg-config \
;\
apt-get clean && rm -rf /var/lib/apt/lists/* ;

# Install Rust
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y;
ENV PATH="/root/.cargo/bin:${PATH}"

WORKDIR /opt

# Clone repositories
RUN set -eux; \
git clone --depth 1 --branch 1.0.3 https://github.com/valkey-io/valkey-json.git; \
git clone --depth 1 --branch 1.0.1 https://github.com/valkey-io/valkey-bloom.git; \
git clone --depth 1 --branch 1.2.1 https://github.com/valkey-io/valkey-search.git; \
git clone --depth 1 --branch 1.1.1 https://github.com/valkey-io/valkey-ldap.git;

# Build JSON module
WORKDIR /opt/valkey-json
RUN set -eux; \
SERVER_VERSION=9.2 ./build.sh --release

# Build Bloom module
WORKDIR /opt/valkey-bloom
RUN cargo build --all --all-targets --release;

# Build Search module
WORKDIR /opt/valkey-search
# TODO: Remove the sed workaround once valkey-search 1.0.x includes the CMAKE_POLICY_VERSION_MINIMUM fix (see https://github.com/valkey-io/valkey-search/pull/626)
RUN set -eux; \
sed -i 's/-DCMAKE_CXX_STANDARD=20"/-DCMAKE_CXX_STANDARD=20 -DCMAKE_POLICY_VERSION_MINIMUM=3.5"/' submodules/CMakeLists.txt; \
./build.sh

# Build LDAP module
WORKDIR /opt/valkey-ldap
RUN cargo build --all --all-targets --release;

FROM docker.io/valkey/valkey:9.2.0-rc1-trixie

RUN mkdir -p /usr/lib/valkey;

# Copy built modules from the build stage
COPY --from=build /opt/valkey-json/build/src/libjson.so /usr/lib/valkey/libjson.so
COPY --from=build /opt/valkey-bloom/target/release/libvalkey_bloom.so /usr/lib/valkey/libvalkey_bloom.so
COPY --from=build /opt/valkey-search/.build-release/libsearch.so /usr/lib/valkey/libsearch.so
COPY --from=build /opt/valkey-ldap/target/release/libvalkey_ldap.so /usr/lib/valkey/libvalkey_ldap.so

COPY bundle-docker-entrypoint.sh /usr/local/bin/
ENTRYPOINT ["bundle-docker-entrypoint.sh"]

EXPOSE 6379
CMD ["valkey-server"]
54 changes: 54 additions & 0 deletions 9.2/debian/bundle-docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#!/bin/sh
set -e

MODULE_DIR="/usr/lib/valkey"
MODULE_ARGS=""
CONFIG=""

# Check if the arguments list have a config file (`something.conf`)
for arg in "${@}"; do
if [ "${arg%.conf}" != "$arg" ]; then
CONFIG="${arg}"
fi
done

# Auto-discover and append all .so modules in MODULE_DIR
for module in "$MODULE_DIR"/*.so; do
if [ "${CONFIG}" != "" ] && [ -n "$(grep "loadmodule $module" "${CONFIG}")" ]; then
# skipping `loadmodule` flag due to being already present in config file
continue
fi
if [ -f "$module" ]; then
MODULE_ARGS="$MODULE_ARGS --loadmodule $module"
fi
done

# Optional: Add extra flags via env var (e.g., logging, maxmemory, etc.)
EXTRA_ARGS="${VALKEY_EXTRA_FLAGS:-}"

# If explicitly calling valkey-server and running as root, drop privileges
if [ "$1" = 'valkey-server' ] && [ "$(id -u)" = '0' ]; then
find . \! -user valkey -exec chown valkey '{}' +
exec setpriv --reuid=valkey --regid=valkey --clear-groups -- "$0" "$@"
fi

# Set a restrictive umask if not already set
um="$(umask)"
if [ "$um" = '0022' ]; then
umask 0077
fi

# first arg is `-f` or `--some-option`
# or first arg is `something.conf`
if [ "${1#-}" != "$1" ] || [ "${1%.conf}" != "$1" ]; then
set -- valkey-server "$@"
fi

# If explicitly calling valkey-server, append modules and extra args
if [ "$1" = "valkey-server" ]; then
shift
exec valkey-server "$@" $MODULE_ARGS $EXTRA_ARGS
fi

# Else, run the provided command (e.g., bash)
exec "$@" $VALKEY_EXTRA_FLAGS
4 changes: 4 additions & 0 deletions dockerhub-description.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
- [`9.0.6-alpine`, `9.0-alpine`](https://github.com/valkey-io/valkey-bundle/blob/mainline/9.0/alpine/Dockerfile)
- [`8.1.10`, `8.1`, `8`, `8.1.10-trixie`, `8.1-trixie`, `8-trixie`](https://github.com/valkey-io/valkey-bundle/blob/mainline/8.1/debian/Dockerfile)
- [`8.1.10-alpine`, `8.1-alpine`, `8-alpine`](https://github.com/valkey-io/valkey-bundle/blob/mainline/8.1/alpine/Dockerfile)
## Release candidates
- [`9.2.0-rc1`, `9.2-rc1`, `9.2.0-rc1-trixie`, `9.2-rc1-trixie`](https://github.com/valkey-io/valkey-bundle/blob/mainline/9.2/debian/Dockerfile)
- [`9.2.0-rc1-alpine`, `9.2-rc1-alpine`](https://github.com/valkey-io/valkey-bundle/blob/mainline/9.2/alpine/Dockerfile)
## Latest unstable
- [`unstable`, `unstable-trixie`](https://github.com/valkey-io/valkey-bundle/blob/mainline/unstable/debian/Dockerfile)
- [`unstable-alpine`](https://github.com/valkey-io/valkey-bundle/blob/mainline/unstable/alpine/Dockerfile)
Expand All @@ -33,6 +36,7 @@ This image is built on top of the official Valkey base image and simplifies depl
| valkey-bundle | valkey | valkey-json | valkey-bloom | valkey-search | valkey-ldap |
|-------------------------|-------------|-------------|--------------|---------------|---------------|
| unstable | unstable | [unstable](https://github.com/valkey-io/valkey-json/tree/unstable) | [unstable](https://github.com/valkey-io/valkey-bloom/tree/unstable) | [main](https://github.com/valkey-io/valkey-search/tree/main) | [main](https://github.com/valkey-io/valkey-ldap/tree/main) |
| 9.2.0-rc1 |[9.2.0-rc1](https://github.com/valkey-io/valkey/releases/tag/9.2.0-rc1) | [1.0.3](https://github.com/valkey-io/valkey-json/releases/tag/1.0.3)| [1.0.1](https://github.com/valkey-io/valkey-bloom/releases/tag/1.0.1)| [1.2.1](https://github.com/valkey-io/valkey-search/releases/tag/1.2.1) | [1.1.1](https://github.com/valkey-io/valkey-ldap/releases/tag/1.1.1) |
| 9.1.3 |[9.1.2](https://github.com/valkey-io/valkey/releases/tag/9.1.2) | [1.0.3](https://github.com/valkey-io/valkey-json/releases/tag/1.0.3)| [1.0.1](https://github.com/valkey-io/valkey-bloom/releases/tag/1.0.1)| [1.2.1](https://github.com/valkey-io/valkey-search/releases/tag/1.2.1) | [1.1.1](https://github.com/valkey-io/valkey-ldap/releases/tag/1.1.1) |
| 9.0.6 |[9.0.6](https://github.com/valkey-io/valkey/releases/tag/9.0.6) | [1.0.3](https://github.com/valkey-io/valkey-json/releases/tag/1.0.3)| [1.0.1](https://github.com/valkey-io/valkey-bloom/releases/tag/1.0.1)| [1.0.3](https://github.com/valkey-io/valkey-search/releases/tag/1.0.3) | [1.0.1](https://github.com/valkey-io/valkey-ldap/releases/tag/1.0.1) |
| 8.1.10 |[8.1.10](https://github.com/valkey-io/valkey/releases/tag/8.1.10) | [1.0.3](https://github.com/valkey-io/valkey-json/releases/tag/1.0.3)| [1.0.1](https://github.com/valkey-io/valkey-bloom/releases/tag/1.0.1)| [1.0.3](https://github.com/valkey-io/valkey-search/releases/tag/1.0.3) | [1.0.1](https://github.com/valkey-io/valkey-ldap/releases/tag/1.0.1) |
Expand Down
23 changes: 23 additions & 0 deletions versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,5 +90,28 @@
"debian": {
"version": "trixie"
}
},
"9.2": {
"version": "9.2.0-rc1",
"valkey-server": {
"version": "9.2.0-rc1"
},
"modules": {
"valkey-json": {
"version": "1.0.3"
},
"valkey-bloom": {
"version": "1.0.1"
},
"valkey-search": {
"version": "1.2.1"
},
"valkey-ldap": {
"version": "1.1.1"
}
},
"debian": {
"version": "trixie"
}
}
}
Loading