containers/buildah

Error while running buildah build in CI/CD

fpt-dylan-datnt305 opened this issue · 0 comments

We are running buildah to build and push Docker applications to ECR. During buildah build phase, we occasionally face issues when the build is nearly completed, with the same error like the log below:

buildah build \
        --format=docker\
        --file Dockerfile \
        -t xxxxxx.dkr.ecr.ap-southeast-1.amazonaws.com/test-app:latest \
        --cache-from xxxxxx.dkr.ecr.ap-southeast-1.amazonaws.com/test-app:latest \
        /workspace
.........
.........

[4/4] STEP 32/32: ENTRYPOINT .....
[4/4 COMMIT xxxxxx.dkr.ecr.ap-southeast-1.amazonaws.com/test-app:latest
Getting image source signatures
Copying
blob sha256:7d9f37fb0d95e53c6c9021eaee3434514f4ccb9c7e5b3af8b20739
Copying blob sha256:fce1d1682718a6dae11025e725fa7feaad9c938d5763ac4ac253ae
Copying blob sha256:5a5a24b5b4b9cae2f9c3771028773191ffe53b217eeffc60c0d663
Copying blob sha256:613a4fa18b4093e106c4c3b09507b330fa0484fdb1a26a9ca45e45
Copying blob sha256:228a46ce9f05596433e2e15b161e7b3028d3b5ca18487076baf34
Copying config sha256: fbe1b447941af34637d7d8e366febbcc1dd0fa328e66a90339c1f76
Writing manifest to image destination
Storing signatures
Successfully tagged xxxxxx.dkr.ecr.ap-southeast-1.amazonaws.com/test-app:latest
error deleting build container
"880d901c2729cb3dbf92477fb6718cb1ac4f8b225d4392c7d31ce1": 1 error occurred:
* unlinkat /var/lib/containers/storage/vfs/dir/9bbacb3f395f5184ddfd5605c25f6214340d44774966230f2624: directory not empty
Failed to run task "build": exit status 125

buildah version
Version: 1.23.1
Go Version: go1.17
Image Spec: 1.0.1
Runtime Spec: 1.0.2-dev
CNI Spec: 0.4.0
libcni Version:
image Version: 5.16.0
Git Commit:
Built: Thu Jan 1 00:00:00 1970
OS/Arch: linux/arm64
BuildPlatform: linux/arm64/v8
buildah info
{
"host": {
"CgroupVersion": "v2",
"Distribution": {
"distribution": "ubuntu",
"version": "22.04"
},
"MemFree": 11198300160,
"MemTotal": 16538238976,
"OCIRuntime": "crun",
"SwapFree": 0,
"SwapTotal": 0,
"arch": "arm64",
"cpus": 4,
"hostname": "poc-pipelin0dea81237e2b6377a8c6435462585f1aea2a6a035e1dc9e7-pod",
"kernel": "6.1.109-118.189.amzn2023.aarch64",
"os": "linux",
"rootless": true,
"uptime": "312h 21m 9.82s (Approximately 13.00 days)"
},
"store": {
"ContainerStore": {
"number": 0
},
"GraphDriverName": "vfs",
"GraphOptions": null,
"GraphRoot": "/var/lib/containers/storage",
"GraphStatus": {},
"ImageStore": {
"number": 0
},
"RunRoot": "/run/containers/storage"
}
}