copacetic: [BUG] ERROR exporting to docker image format
Version of copa
copa version 0.4.1
Expected Behavior
Expected copa to patch the image based on trivy scan results.
Actual Behavior
Getting error during patch process: ERROR exporting to docker image format
Steps To Reproduce
$ trivy version
Version: 0.45.1
Vulnerability DB:
Version: 2
UpdatedAt: 2023-09-30 06:20:06.92472101 +0000 UTC
NextUpdate: 2023-09-30 12:20:06.92472051 +0000 UTC
DownloadedAt: 2023-09-30 11:01:25.072766517 +0000 UTC
$ copa --version
copa version 0.4.1
Run moby/buildkit:v0.12.2 docker:
$ docker run \
--detach \
--rm \
--privileged \
-p 127.0.0.1:8888:8888/tcp \
--name buildkitd \
--entrypoint buildkitd \
"moby/buildkit:v0.12.2" \
--addr tcp://0.0.0.0:8888
I replaced in output scanned image with “my-image”:
Run trivy to get scan results:
$ trivy image --vuln-type os --ignore-unfixed -f json -o copa-patch.json $my-image
2023-09-30T14:01:15.359+0300 INFO Need to update DB
2023-09-30T14:01:15.359+0300 INFO DB Repository: ghcr.io/aquasecurity/trivy-db
2023-09-30T14:01:15.359+0300 INFO Downloading DB...
40.10 MiB / 40.10 MiB [-------------------------------------------------------------------------------------------------------------------------] 100.00% 5.22 MiB p/s 7.9s
2023-09-30T14:01:25.073+0300 INFO Vulnerability scanning is enabled
2023-09-30T14:01:25.073+0300 INFO Secret scanning is enabled
2023-09-30T14:01:25.073+0300 INFO If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2023-09-30T14:01:25.073+0300 INFO Please see also https://aquasecurity.github.io/trivy/v0.45/docs/scanner/secret/#recommendation for faster secret detection
2023-09-30T14:01:35.687+0300 INFO Detected OS: alpine
2023-09-30T14:01:35.687+0300 INFO Detecting Alpine vulnerabilities...
Running copa patch command:
$ copa patch \
-i $my-image \
-r copa-patch.json \
-t $my-image-patched \
-a tcp://0.0.0.0:8888
[+] Building 33.8s (8/8) FINISHED
=> docker-image://my-image 20.8s
=> => resolve my-image 2.0s
=> => sha256:c9d7ead20553853875b36959215175c9a89c23ce08f0e17da02600a1b0e8a5c6 183.08MB / 183.08MB 13.3s
=> => sha256:170e4e13009e9b1d243e32f065068f72c223fbeafc045495da6c010b32a2ab95 1.57MB / 1.57MB 2.3s
=> => sha256:00b38c0d6d7e62793aa6c4200f3c5e404949c34f8a18629ab5ecdec2cdf6a349 127.71kB / 127.71kB 1.8s
=> => sha256:fe25c66a9a3122454dc7f33ecfc88233fc08ad6b49f9f35c0e1b476adc60f617 82.32kB / 82.32kB 1.6s
=> => sha256:30e3f748b11ffca52e071d6ca397a39cc9ee191436a5e7fb8ea547c677cb7e41 146.33MB / 146.33MB 10.4s
=> => sha256:539d3b93165bbb621c904215f176b90cf5854928fa446618f8af28821e78127a 214B / 214B 0.4s
=> => sha256:3e34833d144bccde30401d665ae65ba571447a39a04c2cc02b10a81e8858ce9d 356B / 356B 0.4s
=> => sha256:86787f6d1cfdad7606d38054a7b28cad6ceabf6c13011c2876c1a7dff5278917 34.96MB / 34.96MB 2.9s
=> => sha256:994e83f716a0db024fb37caf707eae5af27172a0fffb691c6e7b53bb7fc5b3ab 9.28MB / 9.28MB 2.2s
=> => sha256:c2fb05fc177834cb351a4f6f3d4e204f9497b99bd9d1f812e7067bc185d9e82d 1.33kB / 1.33kB 0.5s
=> => sha256:041526fa6c45ea6a1845a0cbdc7edd6eefbe586959246af11fc0200d562b5816 57.91MB / 57.91MB 4.1s
=> => sha256:5cf5f0762cf7c3135a3c63cc4711ca56eef959f0cfe5731febc20b271e09ff12 129B / 129B 0.5s
=> => sha256:6a2bf8aa57bd3ac37dc6b5ea64390078bceb596d8bc0f235c45cd470e44e6d09 734B / 734B 0.4s
=> => sha256:5777e64909dd0260c9960d3608ea5a7efa700aa288a8f1fcf014feaf54916206 162B / 162B 0.4s
=> => sha256:914e2f6f2525c162a2725753330257cdbc754d365cc55856402609d0dd047038 46.96MB / 46.96MB 4.0s
=> => sha256:7264a8db6415046d36d16ba98b79778e18accee6ffa71850405994cffa9be7de 3.40MB / 3.40MB 0.7s
=> => extracting sha256:7264a8db6415046d36d16ba98b79778e18accee6ffa71850405994cffa9be7de 0.2s
=> => extracting sha256:994e83f716a0db024fb37caf707eae5af27172a0fffb691c6e7b53bb7fc5b3ab 0.6s
=> => extracting sha256:914e2f6f2525c162a2725753330257cdbc754d365cc55856402609d0dd047038 1.4s
=> => extracting sha256:5777e64909dd0260c9960d3608ea5a7efa700aa288a8f1fcf014feaf54916206 0.0s
=> => extracting sha256:6a2bf8aa57bd3ac37dc6b5ea64390078bceb596d8bc0f235c45cd470e44e6d09 0.0s
=> => extracting sha256:5cf5f0762cf7c3135a3c63cc4711ca56eef959f0cfe5731febc20b271e09ff12 0.0s
=> => extracting sha256:041526fa6c45ea6a1845a0cbdc7edd6eefbe586959246af11fc0200d562b5816 2.2s
=> => extracting sha256:c2fb05fc177834cb351a4f6f3d4e204f9497b99bd9d1f812e7067bc185d9e82d 0.0s
=> => extracting sha256:86787f6d1cfdad7606d38054a7b28cad6ceabf6c13011c2876c1a7dff5278917 0.3s
=> => extracting sha256:3e34833d144bccde30401d665ae65ba571447a39a04c2cc02b10a81e8858ce9d 0.0s
=> => extracting sha256:539d3b93165bbb621c904215f176b90cf5854928fa446618f8af28821e78127a 0.0s
=> => extracting sha256:30e3f748b11ffca52e071d6ca397a39cc9ee191436a5e7fb8ea547c677cb7e41 1.3s
=> => extracting sha256:fe25c66a9a3122454dc7f33ecfc88233fc08ad6b49f9f35c0e1b476adc60f617 0.0s
=> => extracting sha256:00b38c0d6d7e62793aa6c4200f3c5e404949c34f8a18629ab5ecdec2cdf6a349 0.0s
=> => extracting sha256:170e4e13009e9b1d243e32f065068f72c223fbeafc045495da6c010b32a2ab95 0.5s
=> => extracting sha256:c9d7ead20553853875b36959215175c9a89c23ce08f0e17da02600a1b0e8a5c6 2.1s
=> apk update 5.2s
=> apk add --no-cache curl libcurl 3.2s
=> apk upgrade --no-cache curl libcurl 4.3s
=> mkdir /copa-out 0.0s
=> sh -c apk info --installed -v curl libcurl > results.manifest; if [[ $? -ne 0 ]]; then echo "WARN: apk info --installed returned $?"; fi 0.2s
=> diff (apk upgrade --no-cache curl libcurl) -> (sh -c apk info --installed -v curl libcurl > results.manifest; if [[ $? -ne 0 ]]; then echo "WARN: apk info --ins 0.1s
=> => merging 0.1s
=> exporting to client directory 0.1s
=> => copying files 109B 0.0s
INFO[0036] Validated package curl version 8.3.0-r0 meets requested version 8.3.0-r0
INFO[0036] Validated package libcurl version 8.3.0-r0 meets requested version 8.3.0-r0
[+] Building 0.4s (7/7) FINISHED
=> CACHED docker-image://my-image 0.2s
=> => resolve my-image 0.2s
=> CACHED apk update 0.0s
=> CACHED apk add --no-cache curl libcurl 0.0s
=> CACHED apk upgrade --no-cache curl libcurl 0.0s
=> diff (apk update) -> (apk upgrade --no-cache curl libcurl) 0.0s
=> merge (docker-image://my-image, diff (apk update) -> (apk upgrade --no-cache curl libcurl)) 0.0s
=> ERROR exporting to docker image format 0.1s
=> => exporting layers 0.1s
=> => exporting manifest sha256:15ad5322a7e10486a6ca9865856372d0643607e03bd0906b64ec81cc8278382f 0.0s
=> => exporting config sha256:e1228a2a8dedabbc564cdefd337ffda61903c5925ef4956bd66f00d1fcbe0e76 0.0s
------
> exporting to docker image format:
------
And it stuck here, till killed (I can add --timeout 1m, but it still failed on same error : ERROR exporting to docker image format) Any ideas will be appreciated.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 1
- Comments: 16 (8 by maintainers)
@sozercan I am using default containerd-backed instance. The issue is still exist