{"id":22428514,"url":"https://github.com/kwame-mintah/testcontainers-python-playground","last_synced_at":"2025-03-27T06:43:58.413Z","repository":{"id":232474734,"uuid":"784432020","full_name":"kwame-mintah/testcontainers-python-playground","owner":"kwame-mintah","description":"🛝 \\ ˈplā-ˌgrau̇nd \\ an area known or suited for activity of a specified sort.","archived":false,"fork":false,"pushed_at":"2024-04-22T16:35:18.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-01T11:43:49.298Z","etag":null,"topics":["python","python312","testcontainers","testcontainers-localstack"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kwame-mintah.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-04-09T20:56:08.000Z","updated_at":"2024-06-18T11:36:23.000Z","dependencies_parsed_at":"2024-04-15T22:40:30.470Z","dependency_job_id":null,"html_url":"https://github.com/kwame-mintah/testcontainers-python-playground","commit_stats":null,"previous_names":["kwame-mintah/testcontainers-python-playground"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kwame-mintah%2Ftestcontainers-python-playground","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kwame-mintah%2Ftestcontainers-python-playground/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kwame-mintah%2Ftestcontainers-python-playground/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kwame-mintah%2Ftestcontainers-python-playground/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kwame-mintah","download_url":"https://codeload.github.com/kwame-mintah/testcontainers-python-playground/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245798538,"owners_count":20673901,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["python","python312","testcontainers","testcontainers-localstack"],"created_at":"2024-12-05T20:15:03.506Z","updated_at":"2025-03-27T06:43:58.391Z","avatar_url":"https://github.com/kwame-mintah.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🛝 Testcontainers Python Playground\n\nAs the name of the repository suggests, it's just a [_playground_](https://dictionary.cambridge.org/dictionary/english/playground).\nWill be used to start various test containers supported by [Testcontainers](https://testcontainers.com/) in preparation for usage on\nvarious projects.\n\n## Prerequisites\n\n1. [Docker for desktop](https://docs.docker.com/desktop/)\n\n\u003e [!NOTE]\n\u003e You may need to enable \"[x] Allow the default Docker socket to be used (requires password)\" within your docker for desktop\n\u003e for containers to run successfully.\n\n## Usage\n\nInstall the necessary python packages in `requirements.txt`:\n\n```shell\npip install requirements.txt\n```\n\nAnd then run any of the tests within the project:\n\n```shell\npytest tests\n```\n\n## Running Docker in Docker (DinD)\n\nTests can also be run within an integration environment (e.g. Jenkins, GitHub, Azure Pipelines etc.)\ntwo things have to be [provided](https://testcontainers-python.readthedocs.io/en/latest/#docker-in-docker-dind):\n\n1. The container has to provide a docker client installation. Either use an image that has docker pre-installed\n   (e.g. the official docker images) or install the client from within the Dockerfile specification.\n\n2. The container has to have access to the docker daemon which can be achieved by mounting `/var/run/docker.sock`\n   or setting the `DOCKER_HOST` environment variable as part of your docker run command.\n\n| Environment Variable                  | Example                                                                        | Description                          |\n|---------------------------------------|--------------------------------------------------------------------------------|--------------------------------------|\n| TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE | /var/run/docker.sock                                                           | Path to Docker’s socket used by ryuk |\n| TESTCONTAINERS_RYUK_PRIVILEGED        | false                                                                          | Run ryuk as a privileged container   |\n| TESTCONTAINERS_RYUK_DISABLED          | false                                                                          | Disable ryuk                         |\n| RYUK_CONTAINER_IMAGE                  | [testcontainers/ryuk:0.7.0](https://hub.docker.com/r/testcontainers/ryuk/tags) | Custom image for ryuk                |\n\nBuild the docker image using the `Dockerfile` provided and then run the container:\n\n```shell\ndocker build -t testcontainers-python:example .\n```\n\n```shell\ndocker run -i -e TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE=/var/run/docker.sock  \\\n  -e TESTCONTAINERS_RYUK_PRIVILEGED=false \\\n  -e TESTCONTAINERS_RYUK_DISABLED=false \\\n  -e RYUK_CONTAINER_IMAGE=testcontainers/ryuk:0.7.0 \\\n  -v /var/run/docker.sock:/var/run/docker.sock \\\n  --name testcontainers-example testcontainers-python:example\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkwame-mintah%2Ftestcontainers-python-playground","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkwame-mintah%2Ftestcontainers-python-playground","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkwame-mintah%2Ftestcontainers-python-playground/lists"}