mirror of
https://github.com/docker/docs.git
synced 2026-06-19 07:35:16 +00:00
36d384d2da
## 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.3 KiB
1.3 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 Go | Testcontainers for Go | Learn how to use Testcontainers for Go to test database interactions with a real PostgreSQL instance. | testcontainers, go, golang, testing, postgresql, integration testing | Learn how to create a Go application and test database interactions using Testcontainers for Go with a real PostgreSQL instance. | 1 | 2 |
|
|
|
In this guide, you will learn how to:
- Create a Go application with modules support
- Implement a Repository to manage customer data in a PostgreSQL database using the pgx driver
- Write integration tests using testcontainers-go
- Reuse containers across multiple tests using test suites
Prerequisites
- Go 1.25+
- Your preferred IDE (VS Code, GoLand)
- A Docker environment supported by Testcontainers. For details, see the testcontainers-go system requirements.
Note
If you're new to Testcontainers, visit the Testcontainers overview to learn more about Testcontainers and the benefits of using it.