askrobots / dbbasic-object-server
Public
Runs live, versioned Python application objects on one VM, with a suite of apps: projects, notes, tasks, files and more.
Dockerfile · 1.3 KB · 29 lines
| 1 | # Test layer for scripts/test_linux_sandbox.sh: the real image plus what the |
| 2 | # tests need and the image must never ship. Built on top of the image of the |
| 3 | # commit under test (BASE), never pushed, never deployed. |
| 4 | # |
| 5 | # - git: five tests read an earlier release with `git archive` or build a |
| 6 | # scratch repository. The version is held to one upstream release; the |
| 7 | # Debian revision floats, because Debian removes superseded revisions. |
| 8 | # - pytest and everything it pulls in, at exact versions. |
| 9 | # - a root helper that signals a sandbox-user process for a test |
| 10 | # (signal_helper.py), and an entrypoint that starts it and then runs the |
| 11 | # image's real entrypoint unchanged. |
| 12 | ARG BASE |
| 13 | FROM ${BASE} |
| 14 | |
| 15 | USER root |
| 16 | RUN apt-get update \ |
| 17 | && apt-get install -y --no-install-recommends "git=1:2.47.*" \ |
| 18 | && rm -rf /var/lib/apt/lists/* \ |
| 19 | && git config --system --add safe.directory '*' |
| 20 | |
| 21 | RUN python -m pip install --no-cache-dir \ |
| 22 | "pytest==9.2.0" "pluggy==1.7.0" "iniconfig==2.3.1" "packaging==26.4" "pygments==2.21.0" |
| 23 | |
| 24 | # Root-owned, like the launcher's copy: root never runs a file the server |
| 25 | # user can edit. |
| 26 | COPY --chown=root:root --chmod=0644 signal_helper.py /usr/local/lib/dbbasic-test/signal_helper.py |
| 27 | COPY --chown=root:root --chmod=0755 entrypoint.sh /usr/local/bin/dbbasic-test-entrypoint |
| 28 | |
| 29 | ENTRYPOINT ["/usr/local/bin/dbbasic-test-entrypoint"] |