diff --git a/docs/features/docker_compose.md b/docs/features/docker_compose.md index b5df6365b8..e9f0b00c3a 100644 --- a/docs/features/docker_compose.md +++ b/docs/features/docker_compose.md @@ -9,6 +9,35 @@ dependent upon. ## Using `docker-compose` directly +``` +go get github.com/testcontainers/testcontainers-go/modules/compose +``` + +!!!warning + + Given the version includes the Compose dependency, and the Docker folks added [a replace directive until the upcoming Docker 22.06 release is out](https://github.com/docker/compose/issues/9946#issuecomment-1288923912), + we were forced to add it too, causing consumers of _Testcontainers for Go_ to add the following replace directive to their `go.mod` files. + We expect this to be removed in the next releases of _Testcontainers for Go_. + + ``` + replace ( + github.com/docker/cli => github.com/docker/cli v20.10.3-0.20221013132413-1d6c6e2367e2+incompatible // 22.06 master branch + github.com/docker/docker => github.com/docker/docker v20.10.3-0.20221013203545-33ab36d6b304+incompatible // 22.06 branch + github.com/moby/buildkit => github.com/moby/buildkit v0.10.1-0.20220816171719-55ba9d14360a // same as buildx + + github.com/opencontainers/runc => github.com/opencontainers/runc v1.1.2 // Can be removed on next bump of containerd to > 1.6.4 + + // For k8s dependencies, we use a replace directive, to prevent them being + // upgraded to the version specified in containerd, which is not relevant to the + // version needed. + // See https://github.com/docker/buildx/pull/948 for details. + // https://github.com/docker/buildx/blob/v0.8.1/go.mod#L62-L64 + k8s.io/api => k8s.io/api v0.22.4 + k8s.io/apimachinery => k8s.io/apimachinery v0.22.4 + k8s.io/client-go => k8s.io/client-go v0.22.4 + ) + ``` + Because `docker-compose` v2 is implemented in Go it's possible for _Testcontainers for Go_ to use [`github.com/docker/compose`](https://github.com/docker/compose) directly and skip any process execution/_docker-compose-in-a-container_ scenario. The `ComposeStack` API exposes this variant of using `docker-compose` in an easy way. diff --git a/docs/quickstart/gotest.md b/docs/quickstart/gotest.md index 843548bf15..2c2cb11b03 100644 --- a/docs/quickstart/gotest.md +++ b/docs/quickstart/gotest.md @@ -13,31 +13,6 @@ We use [gomod](https://blog.golang.org/using-go-modules) and you can get it inst go get github.com/testcontainers/testcontainers-go ``` -!!!warning - - Given the version includes the Compose dependency, and the Docker folks added [a replace directive until the upcoming Docker 22.06 release is out](https://github.com/docker/compose/issues/9946#issuecomment-1288923912), - we were forced to add it too, causing consumers of _Testcontainers for Go_ to add the following replace directive to their `go.mod` files. - We expect this to be removed in the next releases of _Testcontainers for Go_. - - ``` - replace ( - github.com/docker/cli => github.com/docker/cli v20.10.3-0.20221013132413-1d6c6e2367e2+incompatible // 22.06 master branch - github.com/docker/docker => github.com/docker/docker v20.10.3-0.20221013203545-33ab36d6b304+incompatible // 22.06 branch - github.com/moby/buildkit => github.com/moby/buildkit v0.10.1-0.20220816171719-55ba9d14360a // same as buildx - - github.com/opencontainers/runc => github.com/opencontainers/runc v1.1.2 // Can be removed on next bump of containerd to > 1.6.4 - - // For k8s dependencies, we use a replace directive, to prevent them being - // upgraded to the version specified in containerd, which is not relevant to the - // version needed. - // See https://github.com/docker/buildx/pull/948 for details. - // https://github.com/docker/buildx/blob/v0.8.1/go.mod#L62-L64 - k8s.io/api => k8s.io/api v0.22.4 - k8s.io/apimachinery => k8s.io/apimachinery v0.22.4 - k8s.io/client-go => k8s.io/client-go v0.22.4 - ) - ``` - ## 2. Spin up Redis ```go