containers / podman

Podman: A tool for managing OCI containers and pods.
https://podman.io
Apache License 2.0
23.68k stars 2.41k forks source link

builder-jammy-tiny fails to build spring-boot native jar: permission denied #24405

Open shineeng opened 6 days ago

shineeng commented 6 days ago

Issue Description

the build made with paketo buildpack fails upon final cleaning phase with permission error

Steps to reproduce the issue

Steps to reproduce the issue

  1. Create a spring-boot application
  2. compile it with -Pnative flag
  3. the cleanup phase can't be completed with a permission error

Describe the results you received

[INFO] [creator] 22.2s (9.3% of total time) in 1321 GCs | Peak RSS: 6.36GB | CPU load: 9.61 [INFO] [creator] -------------------------------------------------------------------------------- [INFO] [creator] Produced artifacts: [INFO] [creator] /layers/paketo-buildpacks_native-image/native-image/it.eng.silcloud.anagrafiche.AnagraficheApplication (executable) [INFO] [creator] /layers/paketo-buildpacks_native-image/native-image/libawt.so (jdk_library) [INFO] [creator] /layers/paketo-buildpacks_native-image/native-image/libawt_headless.so (jdk_library) [INFO] [creator] /layers/paketo-buildpacks_native-image/native-image/libawt_xawt.so (jdk_library) [INFO] [creator] /layers/paketo-buildpacks_native-image/native-image/libfontmanager.so (jdk_library) [INFO] [creator] /layers/paketo-buildpacks_native-image/native-image/libfreetype.so (jdk_library) [INFO] [creator] /layers/paketo-buildpacks_native-image/native-image/libjava.so (jdk_library_shim) [INFO] [creator] /layers/paketo-buildpacks_native-image/native-image/libjavajpeg.so (jdk_library) [INFO] [creator] /layers/paketo-buildpacks_native-image/native-image/libjvm.so (jdk_library_shim) [INFO] [creator] /layers/paketo-buildpacks_native-image/native-image/liblcms.so (jdk_library) [INFO] [creator] ================================================================================ [INFO] [creator] Finished generating 'it.pem.bimbam.anagrafiche.AnagraficheApplication' in 3m 57s. [INFO] [creator] Removing bytecode [INFO] [creator] unable to invoke layer creator [INFO] [creator] unable to remove /workspace/BOOT-INF [INFO] [creator] unlinkat /workspace/BOOT-INF: permission denied [INFO] [creator] ERROR: failed to build: exit status 1 [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 05:58 min

Describe the results you expected

a compiled image published on my local repo

podman info output

host: arch: amd64 buildahVersion: 1.37.3 cgroupControllers: [] cgroupManager: cgroupfs cgroupVersion: v1 conmon: package: conmon-2.1.12-2.fc40.x86_64 path: /usr/bin/conmon version: 'conmon version 2.1.12, commit: ' cpuUtilization: idlePercent: 92.37 systemPercent: 0.37 userPercent: 7.25 cpus: 14 databaseBackend: sqlite distribution: distribution: fedora variant: container version: "40" eventLogger: journald freeLocks: 2043 hostname: ALE idMappings: gidmap:

Podman in a container

No

Privileged Or Rootless

Privileged

Upstream Latest Release

Yes

Additional environment details

Compiling spring-boot 3.3.3, Java 21

Additional information

Crossposted on paketo tracker and on stackoverflow

vcutarelli1974 commented 6 days ago

cazzo anche io ho 'sto problema

Luap99 commented 6 days ago

You will need to provide a proper podman reproducer (ideally minimal), I have no idea what spring boot does. We need the actual podman commands or API calls for to work with.