General Docker requirements
Overview
Host Operating System / Environment | Minimum recommended docker versions | Known issues / tips |
---|---|---|
Linux - general | Docker v1.10 | |
Linux - Travis CI | Docker v1.10 | See example .travis.yml for baseline Travis CI configuration |
Linux - Circle CI (LXC driver) | Docker v1.9.1 | The exec feature is not compatible with Circle CI. See example circle.yml for baseline CircleCI configuration |
Linux - within a Docker container | Docker v1.12 | See Running inside Docker for Docker-in-Docker and Docker wormhole patterns |
Mac OS X - Docker Toolbox | Docker Machine v0.8.0 | |
Mac OS X - Docker for Mac | 1.12.0 | Support is best-efforts at present. getTestHostIpAddress() is not currently supported due to limitations in Docker for Mac. |
Windows - Docker Toolbox | Support is limited at present and this is not currently tested on a regular basis. | |
Windows - Docker for Windows | Support is best-efforts at present. Only Linux Containers (LCOW) are supported at the moment. See Windows Support | |
Windows - Windows Subsystem for Linux (WSL) | Docker v17.06 | Support is best-efforts at present. Only Linux Containers (LCOW) are supported at the moment. See Windows Support. |
Docker environment discovery
Testcontainers will try to connect to a Docker daemon using the following strategies in order:
- Environment variables:
DOCKER_HOST
DOCKER_TLS_VERIFY
DOCKER_CERT_PATH
- Defaults:
DOCKER_HOST=https://localhost:2376
DOCKER_TLS_VERIFY=1
DOCKER_CERT_PATH=~/.docker
- If Docker Machine is installed, the docker machine environment for the first machine found. Docker Machine needs to be on the PATH for this to succeed.
- If you're going to run your tests inside a container, please read Patterns for running tests inside a docker container first.