File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ FROM whanos-foundation
2+
3+ # Install Python (for the Befunge interpreter)
4+ RUN nix-env -iA nixpkgs.python3
5+
6+ # Add our Befunge-93 interpreter to PATH
7+ # Place it in $HOME/.local/bin which is already on PATH in the foundation image
8+ WORKDIR /home/nixuser
9+ # When building, set the build context to the repo root (.) so this path resolves
10+ COPY befunge/befunge93 /home/nixuser/.local/bin/befunge93
11+ # RUN chmod +x /home/nixuser/.local/bin/befunge93
12+
13+ WORKDIR /app
14+
15+ # Default command (can be overridden by custom Dockerfile)
16+ CMD ["/bin/bash"]
Original file line number Diff line number Diff line change 1+ FROM whanos-befunge AS builder
2+
3+ # Use a consistent app working directory
4+ WORKDIR /app
5+
6+ # Copy the Befunge program (expected: single app/main.bf)
7+ COPY app app
8+
9+ # Validate required entry file exists during build
10+ RUN test -f app/main.bf
11+
12+ FROM whanos-befunge
13+ WORKDIR /app
14+ COPY --from=builder /app /app
15+
16+ # Run the interpreter against the provided program
17+ ENTRYPOINT ["befunge93"]
18+ CMD ["app/main.bf"]
You can’t perform that action at this time.
0 commit comments