Skip to content

Commit

Permalink
docs: document replace directive for Docker Compose (#632)
Browse files Browse the repository at this point in the history
* docs: document replace directive for Docker Compose

* chore: convert it into a warning message

* fix: use complete replace directive
  • Loading branch information
mdelapenya authored Nov 22, 2022
1 parent 9ad2a50 commit bc4cec8
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions docs/quickstart/gotest.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,31 @@ 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
Expand Down

0 comments on commit bc4cec8

Please sign in to comment.