2022-05-28 07:26:24 +03:00
|
|
|
# A redis server with the libredis_cell module installed
|
2022-05-21 23:40:22 +03:00
|
|
|
FROM rust:1-bullseye as builder
|
|
|
|
|
|
|
|
WORKDIR /usr/src/redis-cell
|
|
|
|
RUN \
|
|
|
|
--mount=type=cache,target=/usr/local/cargo/registry \
|
2022-08-06 08:46:33 +03:00
|
|
|
--mount=type=cache,target=/usr/src/web3_proxy/target \
|
2022-05-21 23:40:22 +03:00
|
|
|
{ \
|
|
|
|
set -eux; \
|
|
|
|
git clone -b v0.3.0 https://github.com/brandur/redis-cell .; \
|
|
|
|
cargo build --release; \
|
|
|
|
}
|
|
|
|
|
|
|
|
FROM redis:bullseye
|
|
|
|
|
|
|
|
COPY --from=builder /usr/src/redis-cell/target/release/libredis_cell.so /usr/lib/redis/modules/
|
|
|
|
|
|
|
|
CMD ["redis-server", "--loadmodule", "/usr/lib/redis/modules/libredis_cell.so"]
|