Complete the Docker command to create a volume named 'mydata'.
docker volume [1] mydataThe docker volume create command creates a new volume. Other commands like build, run, or start do not create volumes.
Complete the Docker run command to mount a volume named 'mydata' to '/app/data' inside the container.
docker run -v [1]:/app/data myimageWhen mounting a volume by name, use -v volume_name:container_path. Here, mydata is the volume name, and /app/data is the container path.
Fix the error in the Docker run command to mount a host directory '/data' as a volume inside the container at '/app/data'.
docker run -v [1]:/app/data myimageTo mount a host directory, use the full path on the host before the colon. Here, /data is the host directory.
Fill both blanks to create a volume and then run a container mounting it at '/data'.
docker volume [1] myvol && docker run -v [2]:/data alpine
First, create the volume with docker volume create myvol. Then run the container mounting myvol at /data.
Fill all three blanks to define a Docker Compose volume and mount it to '/var/lib/mysql' in the service.
version: '3.8' services: db: image: mysql volumes: - [1]:/var/lib/mysql volumes: [2]: [3]: local
The volume name dbdata is used in both the service and volumes section. The driver key is set to local to use the default volume driver.