File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,3 +23,19 @@ This repository needs FULL conversion from TS/JS to ReScript.
2323- Use tsc or TypeScript compiler
2424
2525See TS_CONVERSION_NEEDED.md for full migration guide.
26+
27+ ## Container Policy (RSR)
28+
29+ ### Primary Stack
30+ - ** Runtime** : nerdctl (not docker)
31+ - ** Base Image** : wolfi (cgr.dev/chainguard/wolfi-base)
32+ - ** Distroless** : Use distroless variants where possible
33+
34+ ### Fallback Stack
35+ - ** Runtime** : podman (if nerdctl unavailable)
36+ - ** Base Image** : alpine (if wolfi unavailable)
37+
38+ ### DO NOT:
39+ - Use ` docker ` command (use ` nerdctl ` or ` podman ` )
40+ - Use Dockerfile (use Containerfile)
41+ - Use debian/ubuntu base images (use wolfi/alpine)
Original file line number Diff line number Diff line change 1+ name : Container Policy
2+ on : [push, pull_request]
3+ jobs :
4+ check :
5+ runs-on : ubuntu-latest
6+ steps :
7+ - uses : actions/checkout@v4
8+ - name : Enforce container policy
9+ run : |
10+ # Block new Dockerfiles
11+ NEW_DOCKER=$(git diff --name-only --diff-filter=A HEAD~1 2>/dev/null | grep -iE 'dockerfile' || true)
12+ if [ -n "$NEW_DOCKER" ]; then
13+ echo "❌ New Dockerfile detected. Use Containerfile instead."
14+ exit 1
15+ fi
16+
17+ # Check for docker command usage in scripts
18+ DOCKER_CMD=$(grep -r "docker build\|docker run\|docker push" --include="*.sh" --include="*.yml" --include="*.yaml" . 2>/dev/null | grep -v "nerdctl\|podman" | head -5 || true)
19+ if [ -n "$DOCKER_CMD" ]; then
20+ echo "⚠️ docker command found. Prefer nerdctl or podman:"
21+ echo "$DOCKER_CMD"
22+ fi
23+
24+ echo "✅ Container policy check passed"
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ FROM rust:1.75-slim as builder
77WORKDIR /build
88
99# Install build dependencies
10- RUN apt-get update && apt-get install -y \
10+ RUN apt-get update && apk add --no-cache -y \
1111 pkg-config \
1212 libssl-dev \
1313 && rm -rf /var/lib/apt/lists/*
@@ -28,12 +28,12 @@ COPY server/src ./src
2828RUN cargo build --release --bin universal-connector-server
2929
3030# Runtime stage
31- FROM debian :bookworm-slim
31+ FROM cgr.dev/chainguard/wolfi-base :bookworm-slim
3232
3333WORKDIR /app
3434
3535# Install runtime dependencies
36- RUN apt-get update && apt-get install -y \
36+ RUN apt-get update && apk add --no-cache -y \
3737 ca-certificates \
3838 && rm -rf /var/lib/apt/lists/*
3939
You can’t perform that action at this time.
0 commit comments