Document configuration for building images with Colima

Closes gh-34522
This commit is contained in:
Andy Wilkinson
2023-10-25 12:44:08 +01:00
parent 9a23e13894
commit 666f68ea60
6 changed files with 107 additions and 1 deletions

View File

@@ -415,7 +415,20 @@ The plugin can be configured to use podman local connection by providing connect
include::../maven/packaging-oci-image/docker-podman-pom.xml[tags=docker-podman]
----
TIP: With the `podman` CLI installed, the command `podman info --format='{{.Host.RemoteSocket.Path}}'` can be used to get the value for the `docker.host` configuration property shown in this example.
TIP: With the `colima` CLI installed, the command `podman info --format='{{.Host.RemoteSocket.Path}}'` can be used to get the value for the `docker.host` configuration property shown in this example.
[[build-image.examples.docker.colima]]
==== Docker Configuration for Colima
The plugin can communicate with the Docker daemon provided by https://github.com/abiosoft/colima[Colima].
The `DOCKER_HOST` environment variable can be set by using the command `export DOCKER_HOST=$(docker context inspect colima -f '{{.Endpoints.docker.Host}}').`
The plugin can also be configured to use Colima daemon by providing connection details similar to those shown in the following example:
[source,xml,indent=0,subs="verbatim,attributes",tabsize=4]
----
include::../maven/packaging-oci-image/docker-colima-pom.xml[tags=docker-colima]
----
[[build-image.examples.docker.auth]]
==== Docker Configuration for Authentication

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- tag::docker-colima[] -->
<project>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<docker>
<host>unix:///${user.home}/.colima/docker.sock</host>
</docker>
</configuration>
</plugin>
</plugins>
</build>
</project>
<!-- end::docker-colima[] -->