Skip to content

Commit b990e03

Browse files
committed
Update circle_ci.md
CircleCI supports Testcontainers on the default docker execution environment
1 parent dd1427e commit b990e03

File tree

1 file changed

+11
-8
lines changed
  • docs/supported_docker_environment/continuous_integration

1 file changed

+11
-8
lines changed

docs/supported_docker_environment/continuous_integration/circle_ci.md

+11-8
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
1-
# CircleCI (Cloud, Server v2.x, and Server v3.x)
1+
# CircleCI (Cloud, Server v3.x, and Server v4.x)
22

3-
Your CircleCI configuration should use a dedicated VM for Testcontainers to work. You can achieve this by specifying the
4-
executor type in your `.circleci/config.yml` to be `machine` instead of the default `docker` executor (see [Choosing an Executor Type](https://circleci.com/docs/2.0/executor-types/) for more info).
3+
Your CircleCI configuration needs to enable Docker environment for Testcontainers to work. You can achieve this by adding the `setup_remote_docker` step to your `.circleci/config.yml`.
54

6-
Here is a sample CircleCI configuration that does a checkout of a project and runs Maven:
5+
>When you use the remote Docker environment for a job, any Docker commands you run in your job will be executed locally on the virtual machine used to spin up your primary Docker container. The term remote used here is left over from when remote Docker usage would spin up a separate, remote environment for running Docker commands.
6+
7+
See [Run Docker commands](https://circleci.com/docs/building-docker-images/) for more info.
8+
9+
Here is a sample CircleCI configuration:
710

811
```yml
912
jobs:
1013
build:
11-
# Check https://circleci.com/docs/executor-intro#linux-vm for more details
12-
machine: true
14+
# Check https://circleci.com/docs/circleci-images/ for more details
15+
docker:
16+
- image: cimg/openjdk:17.0
1317
steps:
1418
- checkout
19+
- setup_remote_docker
1520
- run: mvn -B clean install
1621
```
17-
18-
You can learn more about the best practices of using Testcontainers together with CircleCI in [this article](https://www.atomicjar.com/2022/12/testcontainers-with-circleci/).

0 commit comments

Comments
 (0)