mirror of
https://github.com/docker/docs.git
synced 2026-03-27 14:28:47 +07:00
## Description Migrate the first two Testcontainers getting-started guides from [testcontainers.com/guides](https://testcontainers.com/guides/) into the Docker docs site: - **Getting started with Testcontainers for Go** — multi-page guide with 4 chapters (create project, write tests, test suites, run tests). Code updated to testcontainers-go v0.41.0 API (`postgres.Run()`, `CleanupContainer`, `BasicWaitStrategies()`). - **Getting started with Testcontainers for Python** — multi-page guide with 3 chapters (create project, write tests, run tests). Code updated to testcontainers-python 4.14.2 (fixed `get_exposed_port()` returning `int`). Each guide appears as its own entry in the `/guides/` listing with proper language and tag filters (`testing-with-docker`). Chapters render with stepper navigation in the sidebar. Also adds: - A `testing-with-docker` tag to `data/tags.yaml` - A Claude skill (`.claude/skills/testcontainers-guides-migrator/SKILL.md`) that documents the repeatable migration process for the remaining 19 guides - Links from `content/manuals/testcontainers.md` to the new guides - Vale vocabulary entries for `pgx`, `Micronaut`, `psycopg`, `pytest` All guide code was compiled and tests verified passing in containers with Docker socket mounted. ## Related issues or tickets No related issues found. ## Reviews - [ ] Technical review - [ ] Editorial review - [ ] Product review
1.2 KiB
1.2 KiB
title, linkTitle, description, keywords, summary, toc_min, toc_max, tags, languages, params
| title | linkTitle | description | keywords | summary | toc_min | toc_max | tags | languages | params | ||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Getting started with Testcontainers for Python | Testcontainers for Python | Learn how to use Testcontainers for Python to test database interactions with a real PostgreSQL instance. | testcontainers, python, testing, postgresql, integration testing, pytest | Learn how to create a Python application and test database interactions using Testcontainers for Python with a real PostgreSQL instance. | 1 | 2 |
|
|
|
In this guide, you will learn how to:
- Create a Python application that uses PostgreSQL to store customer data
- Use
psycopgto interact with the database - Write integration tests using
testcontainers-pythonandpytest - Manage container lifecycle with pytest fixtures
Prerequisites
- Python 3.10+
- pip
- A Docker environment supported by Testcontainers
Note
If you're new to Testcontainers, visit the Testcontainers overview to learn more about Testcontainers and the benefits of using it.