From bb120b61ded9d6b6ce6287d01f567f9e8b5dcc7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Mon, 21 Nov 2022 18:12:31 +0100 Subject: [PATCH 1/3] docs: document replace directive for Docker Compose --- docs/quickstart/gotest.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/quickstart/gotest.md b/docs/quickstart/gotest.md index 2c2cb11b03..d7428c6ae9 100644 --- a/docs/quickstart/gotest.md +++ b/docs/quickstart/gotest.md @@ -13,6 +13,15 @@ We use [gomod](https://blog.golang.org/using-go-modules) and you can get it inst go get github.com/testcontainers/testcontainers-go ``` +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. + +``` +replace github.com/docker/docker => github.com/docker/docker v20.10.3-0.20221013203545-33ab36d6b304+incompatible // 22.06 branch +``` + +We expect this to be removed in the next releases of _Testcontainers for Go_. + ## 2. Spin up Redis ```go From 0a4e800b82df76d57ecdfa0a4c8e40a6695b9696 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Mon, 21 Nov 2022 18:17:49 +0100 Subject: [PATCH 2/3] chore: convert it into a warning message --- docs/quickstart/gotest.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/docs/quickstart/gotest.md b/docs/quickstart/gotest.md index d7428c6ae9..572a54e44d 100644 --- a/docs/quickstart/gotest.md +++ b/docs/quickstart/gotest.md @@ -13,14 +13,15 @@ We use [gomod](https://blog.golang.org/using-go-modules) and you can get it inst go get github.com/testcontainers/testcontainers-go ``` -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. +!!!warning -``` -replace github.com/docker/docker => github.com/docker/docker v20.10.3-0.20221013203545-33ab36d6b304+incompatible // 22.06 branch -``` + 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_. -We expect this to be removed in the next releases of _Testcontainers for Go_. + ``` + replace github.com/docker/docker => github.com/docker/docker v20.10.3-0.20221013203545-33ab36d6b304+incompatible // 22.06 branch + ``` ## 2. Spin up Redis From b5eaea182fb6558211888c2f1c64a99662cff9c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Tue, 22 Nov 2022 16:46:02 +0100 Subject: [PATCH 3/3] fix: use complete replace directive --- docs/quickstart/gotest.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/docs/quickstart/gotest.md b/docs/quickstart/gotest.md index 572a54e44d..843548bf15 100644 --- a/docs/quickstart/gotest.md +++ b/docs/quickstart/gotest.md @@ -20,7 +20,22 @@ go get github.com/testcontainers/testcontainers-go We expect this to be removed in the next releases of _Testcontainers for Go_. ``` - replace github.com/docker/docker => github.com/docker/docker v20.10.3-0.20221013203545-33ab36d6b304+incompatible // 22.06 branch + 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