genuinetools / img

Standalone, daemon-less, unprivileged Dockerfile and OCI compatible container image builder.
https://blog.jessfraz.com/post/building-container-images-securely-on-kubernetes/
MIT License
3.91k stars 231 forks source link

--cache-to type=local,dest=/cache fails with error writing layer blob: unknown service containerd.services.content.v1.Content: not implemented #310

Open tlawrie opened 4 years ago

tlawrie commented 4 years ago

Issue

When running with --cache-to type=local,dest=/cache I receive the following error. This is using the internal embedded version of runc. Is there any particular parameters that have to be passed to solve this?

error writing layer blob: unknown service containerd.services.content.v1.Content: not implemented

@AkihiroSuda @swrap I see that you were both involved in #300, do you have any thoughts?

issue-label-bot[bot] commented 4 years ago

Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.63. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

swrap commented 4 years ago

I am seeing the same problem on my machine. It seems it only effect the local type. Have not had enough time to look at what is causing it, probably missed something in the PR #300?

fragolinux commented 3 years ago

hi, same issues here, using local type... in first stages of build logs, i have:

=> ERROR importing cache manifest from local:13555893917661289620

and this in last stages:

 => ERROR exporting cache
 => => preparing build cache for export
 => => writing layer sha256:243acf75a5048a5ad77366c112315ae0cf1327896d63e7abfabdf8b4b87a3ed1
------
 > importing cache manifest from local:13555893917661289620:
------
------
 > exporting cache:
------
Error: failed to solve: error writing layer blob: EOF: unknown

docker run as:

docker build --cache-from type=local,src=/cache --cache-to type=local,dest=/cache .........

/cache is correctly mounted RW, i can pass files to and from host and container, if run interactively

pratikbin commented 3 years ago

@tlawrie I'm facing the same issue while using local cache

→ command

sudo img build -t test -f Dockerfile --cache-to type=local,dest=./img_cache --cache-from type=local,dest=./img_cache .

→ error

...
#20 CACHED

#21 exporting to image
#21 exporting layers 0.0s done
#21 exporting manifest sha256:e4538874b96b55a386c8f67e7524e3b84dafde2e7c8bee39b590cf0f93ece0ca done
#21 exporting config sha256:7ee6658fbd6dc283301bb13600d5fb499b9ff93d3fdff95db4e080b466138e5d done
#21 naming to docker.io/library/test:latest done
#21 DONE 0.0s

#22 exporting cache
#22 preparing build cache for export
#22 preparing build cache for export 0.1s done
#22 writing layer sha256:39308ffcbd6db074c3eb453c7000155f843da342f9f1f6c517094fda2d0f8905 done
#22 ERROR: error writing layer blob: unknown service containerd.services.content.v1.Content: not implemented
------
 > importing cache manifest from local:4784753533866841066:
------
------
 > exporting cache:
------
Error: failed to solve: error writing layer blob: unknown service containerd.services.content.v1.Content: not implemented
taxilian commented 3 years ago

same issue here :-( nobody has any idea what is going on? this feature was basically the entire reason I switched to using img and it doesn't work...

hux commented 5 months ago

Still happening in 2024

pratikbin commented 5 months ago

I started using remote docker builder which will takes care of everything