Answers for "docker run with volume"

11

docker mount volume

docker run -v /host/directory:/container/directory -other -options image_name command_to_run
Posted by: Guest on September-16-2020
0

docker run with volume docker api

"HostConfig": {
    "Mounts": [
        {
           "Target":   "path/in/the/container",
           "Source":   "volume1",
           "Type":     "volume", 
           "ReadOnly": false
        }
     ]
}
Posted by: Guest on May-01-2021
0

docker volumes copy content

CID=$(docker run -d -v hello:/hello busybox true)
docker cp $CID:/hello ./
Posted by: Guest on January-30-2021

Python Answers by Framework

Browse Popular Code Answers by Language