Configuration
登录后可跨设备保存划线和私人笔记登录
Configuration
Container runtime access
Testcontainers for PHP uses Docker APIs under the hood, so your test process must be able to reach a Docker-compatible daemon.
- Local socket:
unix:///var/run/docker.sock - Remote daemon: configure
DOCKER_HOST
Environment variables
DOCKER_HOST
Defines where the Docker API is available.
Examples:
1
2export DOCKER_HOST=tcp://127.0.0.1:2375
export DOCKER_HOST=unix:///var/run/docker.sockTESTCONTAINERS_HOST_OVERRIDE
Overrides the host address returned by Testcontainers when your tests need a custom endpoint:
1export TESTCONTAINERS_HOST_OVERRIDE=127.0.0.1Running inside containers
If your tests run inside another container:
- Mount the Docker socket.
- Ensure network routing from test container to started containers is valid.
- Set host overrides when needed for your CI/network topology.
For startup and connectivity failures, see troubleshooting.
评论
登录后参与评论
正在加载评论…
KnowForge