Skip to content

Transfer Files

Use runta cp or SDK file helpers to copy files between your local machine and a runtime.

Start a runtime:

Terminal window
runta run --name demo --cpus 1 --memory 512

Copy a file from the runtime to your local machine:

Terminal window
runta exec demo -- sh -lc 'echo hello-from-runtime > /tmp/message.txt'
runta cp demo:/tmp/message.txt ./message.txt
cat message.txt

Copy a local file into the runtime:

Terminal window
echo "hello world" > hello.txt
runta cp hello.txt demo:/
runta exec demo cat /hello.txt