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
47 changes: 47 additions & 0 deletions .github/workflows/docker-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Docker Test

on:
push:
branches: [ main ]
paths:
- 'docker-compose.yml'
- 'Dockerfile'
- '.github/workflows/docker-test.yml'
- 'crates/**'
pull_request:
paths:
- 'docker-compose.yml'
- 'Dockerfile'
- '.github/workflows/docker-test.yml'
- 'crates/**'

env:
CARGO_TERM_COLOR: always

jobs:
docker-test:
name: Docker Compose Test
runs-on: ubuntu-latest
timeout-minutes: 15

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build Docker images
run: docker compose build

- name: Run Docker Compose test cascade
run: |
docker compose up --abort-on-container-exit --exit-code-from test-redis
EXIT_CODE=$?
docker compose logs
docker compose down -v
exit $EXIT_CODE

- name: Cleanup
if: always()
run: docker compose down -v
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,4 @@ dump.rdb

# Claude
.claude/
CLAUDE.md
198 changes: 0 additions & 198 deletions CLAUDE.md

This file was deleted.

22 changes: 12 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# Redis Enterprise CLI Docker Image
# Redis CLI Docker Image
# Multi-stage build for optimal size

FROM rust:1.82 AS builder
FROM rust:1.89 AS builder

WORKDIR /build

# Copy workspace files
COPY Cargo.toml Cargo.lock ./
COPY Cargo.toml ./
COPY crates/ ./crates/

# Build release binary
RUN cargo build --release --bin redis-enterprise
RUN cargo build --release --bin redisctl

# Runtime stage - minimal debian image
FROM debian:bookworm-slim
# Runtime stage - Ubuntu for newer GLIBC
FROM ubuntu:24.04

# Install runtime dependencies
RUN apt-get update && apt-get install -y \
Expand All @@ -22,11 +22,11 @@ RUN apt-get update && apt-get install -y \
&& rm -rf /var/lib/apt/lists/*

# Copy binary from builder
COPY --from=builder /build/target/release/redis-enterprise /usr/local/bin/redis-enterprise
COPY --from=builder /build/target/release/redisctl /usr/local/bin/redisctl

# Create non-root user
RUN useradd -m -u 1000 redis && \
mkdir -p /home/redis/.config/redis-enterprise && \
RUN useradd -m redis && \
mkdir -p /home/redis/.config/redisctl && \
chown -R redis:redis /home/redis

USER redis
Expand All @@ -36,6 +36,8 @@ WORKDIR /home/redis
ENV REDIS_ENTERPRISE_URL=""
ENV REDIS_ENTERPRISE_USER=""
ENV REDIS_ENTERPRISE_PASSWORD=""
ENV REDIS_CLOUD_API_KEY=""
ENV REDIS_CLOUD_SECRET_KEY=""

ENTRYPOINT ["redis-enterprise"]
ENTRYPOINT ["redisctl"]
CMD ["--help"]
Loading
Loading