Configuration of services running in a container
もくじ
Learn how to initialize and configure Docker containers for testing
by copying files into containers and executing commands inside them.
Time to complete
15 分
In this guide, you will learn how to:
- Initialize containers by copying files into them
- Run commands inside running containers using
execInContainer() - Set up a PostgreSQL database with SQL scripts
- Create AWS S3 buckets in LocalStack containers
Prerequisites
- Java 17+
- Your preferred IDE
- A Docker environment supported by Testcontainers
メモIf you're new to Testcontainers, visit the Testcontainers overview to learn more about Testcontainers and the benefits of using it.
モジュール
- Copy files
Initialize containers by copying files into specific locations.
- Execute commands
Run commands inside running containers to initialize services for testing.