Files
boxsim-fileformat-rev/Dockerfile
T
magdevandClaude Fable 5 85a75b321d Add MIT licence
Declared with the PEP 639 license / license-files fields, so the text ships in
the wheel and the image rather than only the repository. Records the terms of
the two things this repository deliberately does not contain: Boxsim, which is
Visaton freeware and is never redistributed, and kicad-visaton-lib, which is
CC-BY-SA-4.0 and is copied into any image built by tools/build-image.sh.

Verified: pip install exposes License-Expression MIT and packages the text as
dist-info/licenses/LICENSE, both on the host and in the image.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-09-29 12:35:09 +02:00

42 lines
1.5 KiB
Docker

# boxsim: decode Boxsim projects and generate KiCad projects from them.
#
# The image deliberately contains no KiCad and no Boxsim.exe:
# - KiCad 10 is a hard dependency of the *verification* gate only, and stays
# on the host. decode/extract/netlist/build all work without it.
# - The A2F codec is pure Python, so Boxsim's proprietary binary is not needed.
#
# Build via tools/build-image.sh, which stages the Visaton library and the
# Boxsim parts catalogue into the build context.
FROM python:3.13-slim AS base
LABEL org.opencontainers.image.title="boxsim" \
org.opencontainers.image.description="Boxsim project decoder and KiCad project generator" \
org.opencontainers.image.source="https://src.bundespruefstelle.ch/magdev/boxsim-fileformat-rev" \
org.opencontainers.image.licenses="MIT"
WORKDIR /opt/boxsim
COPY pyproject.toml README.md LICENSE ./
COPY boxsim ./boxsim
# Staged by tools/build-image.sh: the upgraded Visaton symbol library and the
# Visaton parts catalogue shipped with Boxsim.
COPY stage/Visaton.kicad_sym ./boxsim/data/Visaton.kicad_sym
COPY stage/Visatonteile.txt ./boxsim/data/Visatonteile.txt
COPY stage/footprints ./boxsim/data/footprints
COPY tools/selfcheck.py ./tools/selfcheck.py
RUN pip install --no-cache-dir .
ENV BOXSIM_CATALOG=/opt/boxsim/boxsim/data/Visatonteile.txt \
BOXSIM_KICAD_LIB=/opt/boxsim/boxsim/data/Visaton.kicad_sym
# Refuse to produce an image whose bundled library does not cover the catalogue.
RUN python tools/selfcheck.py
WORKDIR /work
ENTRYPOINT ["boxsim"]
CMD ["--help"]