Comments (6)
The Spring Boot Gradle plugin documentation includes an example of configuring the plugin for use with podman.
The podman compatibility mode that creates a symlink for /var/run/docker.sock
is enough for the Gradle plugin code to access the podman daemon, as demonstrated by the fact that the builder images are being pulled successfully. Processes inside the builder container also need to access the daemon, and this is the part that is not working for you (the error is coming from the creator
process in the builder lifecycle).
Please try configuring the plugin as documented and let us know if that works.
from spring-boot.
@scottfrederick I experienced the same issue. If I downgrade Spring Boot from 3.2.3 to 3.1.9, the bootBuildImage
task completes successfully.
Also, I tried out the same test using Maven instead of Gradle, and the spring-boot:build-image
command completes successfully for both 3.2.3 and 3.1.9.
So, it seems to be a problem specific to Spring Boot 3.2.x with Gradle.
from spring-boot.
Apologies, I completely forgot that section of the manual.
However, even with those changes the result is still an error.
Before providing more details I'd like to note that the changes suggested by the manual are a bit misleading for people on macOS.
First, the following line is valid only for Linux. On macOS /run
doesn't exist and this could lead to misunderstandings.
host.set("unix:///run/user/1000/podman/podman.sock")
The podman command for finding the socket is also wrong on macOS:
$ podman info --format='{{.Host.RemoteSocket.Path}}'
/run/podman/podman.sock
$ ls -l /run/podman/podman.sock
ls: /run/podman/podman.sock: No such file or directory
In the following comments I will highlight the specific problems I am still having.
from spring-boot.
With host
set to:
host.set("unix:///var/run/docker.sock")
I get (abbreviated):
$ ./gradlew clean bootBuildImage
> Task :bootBuildImage
Building image 'docker.io/library/spring-podman:0.0.1-SNAPSHOT'
> Pulling builder image 'docker.io/paketobuildpacks/builder-jammy-base:latest' ..................................................
> Pulled builder image 'docker.io/paketobuildpacks/builder-jammy-base@sha256:94593b2ad54362e1256da43631661d3dad936a177609a3d297fc638e87c6ee91'
> Pulling run image 'docker.io/paketobuildpacks/run-jammy-base:latest' ..................................................
> Pulled run image 'docker.io/paketobuildpacks/run-jammy-base@sha256:c2bc9ac828642aee2376a649ef5affd6912507c739247a40086bcae6d62a8b41'
> Executing lifecycle version v0.18.5
> Using build cache volume 'pack-cache-f19174dfe539.build'
> Running creator
[creator] ===> ANALYZING
[creator] ERROR: failed to initialize analyzer: getting previous image: permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/info": dial unix /var/run/docker.sock: connect: permission denied
> Task :bootBuildImage FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':bootBuildImage'.
> Builder lifecycle 'creator' failed with status code 1
BUILD FAILED in 6s
6 actionable tasks: 6 executed
$ ls -l /var/run/docker.sock
lrwxr-xr-x 1 root daemon 75 Mar 6 08:52 /var/run/docker.sock -> /Users/andrea.cisternino/.local/share/containers/podman/machine/podman.sock
from spring-boot.
This is interesting.
With host
set to:
host.set("unix:///Users/andrea.cisternino/.local/share/containers/podman/machine/podman.sock")
I get:
$ ./gradlew clean bootBuildImage
> Task :bootBuildImage
Building image 'docker.io/library/spring-podman:0.0.1-SNAPSHOT'
> Pulling builder image 'docker.io/paketobuildpacks/builder-jammy-base:latest' ..................................................
> Pulled builder image 'docker.io/paketobuildpacks/builder-jammy-base@sha256:94593b2ad54362e1256da43631661d3dad936a177609a3d297fc638e87c6ee91'
> Pulling run image 'docker.io/paketobuildpacks/run-jammy-base:latest' ..................................................
> Pulled run image 'docker.io/paketobuildpacks/run-jammy-base@sha256:c2bc9ac828642aee2376a649ef5affd6912507c739247a40086bcae6d62a8b41'
> Executing lifecycle version v0.18.5
> Using build cache volume 'pack-cache-f19174dfe539.build'
> Running creator
> Task :bootBuildImage FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':bootBuildImage'.
> Docker API call to '/Users/andrea.cisternino/.local/share/containers/podman/machine/podman.sock/v1.24/containers/create' failed with status code 500 "Internal Server Error" and message "container create: statfs /Users/andrea.cisternino/.local/share/containers/podman/machine/podman.sock: operation not supported"
BUILD FAILED in 4s
$ ls -l /Users/andrea.cisternino/.local/share/containers/podman/machine/podman.sock
lrwxr-xr-x@ 1 andrea.cisternino staff 80 Feb 2 09:23 /Users/andrea.cisternino/.local/share/containers/podman/machine/podman.sock -> /Users/andrea.cisternino/.local/share/containers/podman/machine/qemu/podman.sock
from spring-boot.
Finally, with host
set to:
host.set("unix:///Users/andrea.cisternino/.local/share/containers/podman/machine/qemu/podman.sock")
I get the exact same result as above.
For info:
$ ls -l /Users/andrea.cisternino/.local/share/containers/podman/machine/qemu/podman.sock
srw------- 1 andrea.cisternino staff 0 Mar 6 08:52 /Users/andrea.cisternino/.local/share/containers/podman/machine/qemu/podman.sock
from spring-boot.
Related Issues (20)
- Configuration properties cannot be bound to DruidDataSource when the environment contains a non-enumerable property source HOT 4
- Incorrect Handling of Active Profiles in Docker Compose Integration HOT 5
- Incorrect classloader used by commom ForkJoinPool when using Executable Jar HOT 2
- Upgrade Ubuntu version in CI images
- Upgrade Ubuntu version in CI images
- Upgrade Ubuntu version in CI images
- Spring Boot 3.2 automatically change log level during shutdown HOT 1
- Create a RestClient alternative to WebTestClient and TestRestTemplate HOT 1
- @Autowired Field Injection HOT 1
- Command pattern in spring HOT 1
- Publish snapshots using GitHub Actions
- mainClass property of bootJar and bootWar cannot be read unless resolveMainClassName has already executed HOT 1
- spring.mvc.converters.preferred-json-mapper is effectively ignored when certain serde frameworks are detected in the classpath, notably kotlinx.serialization HOT 5
- Disable logback packagingData HOT 5
- springboo-rsocket how to use contextView HOT 3
- Unexpected behaviour with new spring boot loader implementation HOT 1
- server.error.include-binding-errors does not recognize MethodValidationResult exceptions
- Deprecate @MockBean and @SpyBean HOT 4
- Longer term Antora enhancements
- @logging.level.org.apache.coyote.http11=DEBUG does not working in spring boot 3.2.3 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spring-boot.