Skip to content

Moving a file from the host system to a container #905

Description

@ysimonson

I want to move a file from the host file system to a container. How do I do this?

I tried docker insert, but there doesn't seem to be much documentation on it, and it doesn't appear to support copying local sources. Both of these commands didn't insert anything into /root:

docker insert image file:///path/to/file /root/file
docker insert image /path/to/file /root/file

...or return any indication or error for that matter. Also tried feeding the contents in from stdin, like so:

`docker run -i -t image cat \> /root/file` < /path/to/file

But that didn't work either.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions