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