-
-
Notifications
You must be signed in to change notification settings - Fork 500
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add docs regarding Colima usage (#547)
- Loading branch information
Showing
2 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Using Colima with Docker | ||
|
||
[Colima](https://github.com/abiosoft/colima) is a container runtime which | ||
integrates with Docker's tooling and can be configured in various ways. | ||
|
||
As of Colima v0.4.0 it's recommended to set the active Docker context to use | ||
Colima. After the context is set testcontainers-go will automatically be | ||
configured to use Colima. | ||
|
||
```bash | ||
$ docker context ls | ||
NAME DESCRIPTION DOCKER ENDPOINT KUBERNETES ENDPOINT ORCHESTRATOR | ||
colima colima unix:///Users/foobar/.colima/default/docker.sock | ||
default * Current DOCKER_HOST based configuration unix:///Users/foobar/.colima/docker.sock | ||
|
||
$ docker context use colima | ||
colima | ||
Current context is now "colima" | ||
|
||
$ docker context ls | ||
NAME DESCRIPTION DOCKER ENDPOINT KUBERNETES ENDPOINT ORCHESTRATOR | ||
colima * colima unix:///Users/foobar/.colima/default/docker.sock | ||
default Current DOCKER_HOST based configuration unix:///var/run/docker.sock | ||
``` | ||
|
||
If you're using an older version of Colima or have other applications that are | ||
unaware of Docker context the following workaround is available: | ||
|
||
1. Locate your Docker Socket, see: [Colima's FAQ - Docker Socket Location](https://github.com/abiosoft/colima/blob/main/docs/FAQ.md#docker-socket-location) | ||
|
||
2. Set the `DOCKER_HOST` environment variable to match the located Docker Socket | ||
|
||
* Example: `export DOCKER_HOST="unix://${HOME}/.colima/default/docker.sock"` | ||
|
||
3. As of testcontainers-go v0.14.0 set `TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE` | ||
to `/var/run/docker.sock` as the default value refers to your `DOCKER_HOST` | ||
environment variable. | ||
|
||
* Example: `export TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE="/var/run/docker.sock"` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters