Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document configuration for building images with Colima #34522

Closed
scottfrederick opened this issue Mar 8, 2023 · 5 comments
Closed

Document configuration for building images with Colima #34522

scottfrederick opened this issue Mar 8, 2023 · 5 comments
Assignees
Labels
type: documentation A documentation update
Milestone

Comments

@scottfrederick
Copy link
Contributor

The Maven and Gradle plugin documentation shows examples of configuring the Docker host for the image building goal/task to use minikube or podman. We should add documentation for configuring the host to use Colima as well.

The DOCKER_HOST environment variable can be set to the location of the Colima socket. On Linux and macOS this can be done with export DOCKER_HOST=$(docker context inspect colima -f '{{.Endpoints.docker.Host}}').

Configuring the host in the Maven pom.xml would look like this:

<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>

Configuring the host in the Gradle build.gradle file would look like this:

tasks.named("bootBuildImage") {
  docker {
    host = "unix://${System.properties['user.home']}/.colima/docker.sock"
  }
}
@scottfrederick scottfrederick added the type: documentation A documentation update label Mar 8, 2023
@scottfrederick scottfrederick added this to the 2.7.x milestone Mar 8, 2023
@misselvexu
Copy link

Assigne to me .

@scottfrederick
Copy link
Contributor Author

Thank you @misselvexu. Please let us know if you have any questions.

@snicoll
Copy link
Member

snicoll commented Aug 4, 2023

@misselvexu how is it going? Are you still interested to contribute?

@misselvexu
Copy link

misselvexu commented Aug 6, 2023 via email

@snicoll
Copy link
Member

snicoll commented Aug 19, 2023

@misselvexu hello. Do you still want to contribute?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: documentation A documentation update
Projects
None yet
Development

No branches or pull requests

4 participants