Open lhmoraes opened 8 months ago
In my research I found that the Jammy buildpack uses two users, 1000 to setup the environment and 1001 to perform the image build. So, I changed the Tekton pipeline, but I'm keep getting the error below. Please, could someone tell me what is missing in my Pipeline script?
2024/02/11 04:13:19 warning: unsuccessful cred copy: ".docker" from "/tekton/creds" to "/": unable to create destination directory: mkdir /.docker: permission denied
ERROR: failed to exec as user 1001:1000: operation not permitted
Hi team, please any help or clue where I'm missing in my pipeline to support Jammy ?
I stumbled into the same problem. The issue seems to be that the securityContext
in the tekton buildpacks task is set to runAsUser: 1000
. This is fine for the bionic-based stack. However, as you have pointed out, the jammy-based stack uses the build user 1001. For me, the solution was to modify the securityContext of the given tekton buildpacks task accordingly and deploying it as a custom task via kubectl apply
.
The Tekton pipeline was working fine until the migration to Jammy. The only pipeline code changed was the image builder name.