1

I find that I can use ctr snapshot mount to copy a file from a container to a host. But how can I copy a file from a host to the container using containerd? I used golang to write some code to start a container, but I can't find any documentation about copying host files to a running container.

Adi Dembak
  • 2,433
  • 2
  • 18
  • 26
si yan
  • 343
  • 1
  • 13
  • Does this answer your question? [Docker: Copying files from Docker container to host](https://stackoverflow.com/questions/22049212/docker-copying-files-from-docker-container-to-host) – Michał Łukasik May 13 '22 at 13:38

1 Answers1

0

As of now there is no provision as such with either with ctr or crictl cli to copy a host file to a running container as we have with docker cli (eg: docker cp).

Though there is a project under containerd known as nerdctl which is trying to emulate the same.

nerdctl is a Docker-compatible CLI for containerd.

Link for reference: Nerctl cp command