BitBucket 파이프라인에서 CNCF Buildpacks의 pack 도구를 사용해 컨테이너 이미지를 생성하려고 실험 중인데, 다음과 같은 오류가 발생하고 있습니다:
ERROR: failed to build: failed to create 'creator' container: Error response from daemon: authorization denied by plugin pipelines: -v only supports $BITBUCKET_CLONE_DIR and its subdirectories"
Buildpacks는 일부 마운트 지점에 대해 특정 마운트 디렉토리를 정의할 수 있는 기능을 제공하며, 이들을 BitBucket의 clone 디렉토리로 설정할 수는 있지만, 일부 마운트 지점은 설정할 수 없는 것 같습니다.
Using build cache dir '/opt/atlassian/pipelines/agent/build/build-cache'
Build cache '/opt/atlassian/pipelines/agent/build/build-cache' cleared
Created ephemeral bridge network pack.local-network-<id> with ID <id>
Running the 'creator' on OS 'linux' from image 'pack.local/builder/<id>:latest' with:
Container Settings:
Args: '/cnb/lifecycle/creator -daemon -launch-cache /launch-cache -log-level debug -app //opt/atlassian/pipelines/agent/build -cache-dir /cache -run-image index.docker.io/paketobuildpacks/run-jammy-base:latest -skip-restore <project>'
System Envs: 'CNB_PLATFORM_API=0.13'
Image: 'pack.local/builder/<id>:latest'
User: 'root'
Labels: 'map[author:pack]'
Host Settings:
Binds: '/opt/atlassian/pipelines/agent/build/build-cache:/cache /var/run/docker.sock:/var/run/docker.sock /opt/atlassian/pipelines/agent/build/launch-cache/launch-cache:/launch-cache pack-layers-<id>:/layers pack-app-<id>://opt/atlassian/pipelines/agent/build'
Network Mode: 'pack.local-network-<id>'
ERROR: failed to build: executing lifecycle: failed to create 'creator' container: Error response from daemon: authorization denied by plugin pipelines: -v only supports $BITBUCKET_CLONE_DIR and its subdirectories
/layers로 마운트된 layers-가 BitBucket의 clone 디렉토리 밖이어서 문제가 발생한 것으로 보입니다. 혼란스러운 점은, maven 빌드에서는 pack을 사용할 때 이 문제가 발생하지 않는다는 점이며, 실행 명령 구성이 유사하다고 느껴집니다. /var/run/docker.sock:/var/run/docker.sock 마운트가 허용되는지도 확실하지 않습니다.
다양한 buildpack을 사용해보고, 실행 시점에 사용할 buildpack을 정의하고, 캐시 위치를 명시하는 등의 시도를 했지만 모두 동일한 오류가 발생했습니다.
로컬 머신에서는 빌드가 정상적으로 작동합니다.
더 이상 시도해볼 아이디어가 없어서 도움을 부탁드립니다.