/ Containerfile.dev
Containerfile.dev
1 # SPDX-License-Identifier: AGPL-3.0-or-later 2 # SPDX-FileCopyrightText: 2025 Jonathan D.A. Jewell 3 # 4 # Reposystem Development Container 5 # ================================ 6 # Full development environment for reposystem 7 # Use this for development; Containerfile for production 8 # 9 # Build: nerdctl build -f Containerfile.dev -t reposystem:dev . 10 # Run: nerdctl run -it --rm -v $(pwd):/workspace reposystem:dev 11 12 FROM cgr.dev/chainguard/wolfi-base:latest 13 14 # ============================================================================ 15 # Development Dependencies 16 # ============================================================================ 17 # Note: Wolfi packages differ from Alpine 18 # - rustup provides rust + cargo 19 # - Some packages may not be available; we install what's there 20 RUN apk add --no-cache \ 21 # Rust toolchain (rustup bundles cargo) 22 rustup \ 23 # Deno runtime 24 deno \ 25 # Version control 26 git \ 27 git-lfs \ 28 # Graph visualization 29 graphviz \ 30 # Scheme runtime 31 guile \ 32 # Build tools (just may not be in Wolfi, use make as fallback) 33 make \ 34 # Shell utilities 35 bash \ 36 coreutils \ 37 findutils \ 38 grep \ 39 jq \ 40 yq \ 41 # Security tools 42 cosign \ 43 # Editor 44 busybox 45 46 # ============================================================================ 47 # Create development user 48 # ============================================================================ 49 RUN addgroup -g 1000 dev && \ 50 adduser -u 1000 -G dev -D -s /bin/bash dev 51 52 # ============================================================================ 53 # Development directories 54 # ============================================================================ 55 RUN mkdir -p /workspace /data /home/dev/.cache /home/dev/.cargo && \ 56 chown -R dev:dev /workspace /data /home/dev 57 58 # ============================================================================ 59 # Switch to dev user 60 # ============================================================================ 61 USER dev 62 WORKDIR /workspace 63 64 # ============================================================================ 65 # Environment 66 # ============================================================================ 67 ENV SHELL=/bin/bash 68 ENV TERM=xterm-256color 69 ENV EDITOR=busybox 70 ENV CARGO_HOME=/home/dev/.cargo 71 ENV RUSTUP_HOME=/home/dev/.rustup 72 ENV DENO_DIR=/home/dev/.deno 73 ENV PATH="${CARGO_HOME}/bin:${DENO_DIR}/bin:${PATH}" 74 75 # Set up Rust toolchain via rustup (as dev user) 76 RUN rustup-init -y --default-toolchain stable 77 78 # ============================================================================ 79 # Default command 80 # ============================================================================ 81 CMD ["/bin/bash"] 82 83 # ============================================================================ 84 # Labels 85 # ============================================================================ 86 LABEL org.opencontainers.image.title="Reposystem Dev" 87 LABEL org.opencontainers.image.description="Development environment for reposystem"