Skip to content

Commit 1464853

Browse files
Sebastian Hätälätillahoffmann
andauthored
add description for running testcontainers from docker (#110)
* add description for running testcontainers from docker * adapt suggested changes regarding container wording Co-authored-by: Till Hoffmann <[email protected]> * adapt suggested changes regarding build wording Co-authored-by: Till Hoffmann <[email protected]> Co-authored-by: Till Hoffmann <[email protected]>
1 parent 71f2a87 commit 1464853

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

README.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,15 @@ The snippet above will spin up a MySql database in a container. The :code:`get_c
5151

5252
More extensive documentation can be found at `Read The Docs <http://testcontainers-python.readthedocs.io/>`_.
5353

54+
Usage within Docker (i.e. in a CI)
55+
----------------------------------
56+
57+
When trying to launch a testcontainer from within a Docker container two things have to be provided:
58+
59+
1. The container has to provide a docker client installation. Either use an image that has docker pre-installed (e.g. the [official docker images](https://hub.docker.com/_/docker)) or install the client from within the `Dockerfile` specification.
60+
2. The container has to have access to the docker daemon which can be achieved by mounting `/var/run/docker.sock` or setting the `DOCKER_HOST` environment variable as part of your `docker run` command.
61+
62+
5463
Setting up a development environment
5564
------------------------------------
5665

0 commit comments

Comments
 (0)