31 lines
1.5 KiB
Docker
31 lines
1.5 KiB
Docker
# Minimal, disposable environment for the tests that cannot safely or
|
|||
|
|
# meaningfully run against a real machine: anything that installs the
|
||
|
|
# plexer hook into a real ~/.bashrc, or needs a real tmux session to test
|
||
|
|
# TmuxPlexerController against. Built fresh per run (see tests/container.py);
|
||
|
|
# nothing here is meant to persist, which is the entire point -- these tests
|
||
|
|
# get to do things no test should ever do to the machine actually running
|
||
|
|
# Claude Code.
|
||
|
|
FROM python:3.11-slim
|
||
|
|
|
||
|
|
# bash: the thing being wrapped. tmux: TmuxPlexerController's real backend.
|
||
|
|
# procps: `ps`, used by tests/plexer.py and tests/bashrc.py to prove a
|
||
|
|
# process is actually gone, not just assumed gone. git: sysinfo/create_skill
|
||
|
|
# paths touch it; harmless to have for a "simulate everything" image.
|
||
|
|
RUN apt-get update \
|
||
|
|
&& apt-get install -y --no-install-recommends bash tmux procps git ca-certificates \
|
||
|
|
&& rm -rf /var/lib/apt/lists/*
|
||
|
|
|
||
|
|
WORKDIR /app
|
||
|
|
COPY . /app
|
||
|
|
|
||
|
|
# Safety marker, not a feature flag: tests/bashrc.py refuses to install a
|
||
|
|
# real hook into $HOME/.bashrc unless this is set, so a copy-paste of this
|
||
|
|
# test file running directly on a developer's machine fails loud instead of
|
||
|
|
# quietly rewriting their actual shell startup.
|
||
|
|
ENV TAI_CONTAINER_TEST=1
|
||
|
|
|
||
|
|
# No ENTRYPOINT/CMD here on purpose -- tests/container.py always passes an
|
||
|
|
# explicit command (python3 tests/container.py --inside ...), so this image
|
||
|
|
# has one job and docker-compose.yml's `command:` is the single source of
|
||
|
|
# truth for what that job is, not two places that can drift apart.
|