Complete the code to create a Docker volume named 'data_vol'.
docker volume [1] data_volThe docker volume create command creates a new volume named 'data_vol'.
Complete the code to run a container named 'app1' and mount the volume 'data_vol' to '/app/data'.
docker run -d --name app1 -v [1]:/app/data alpine sleep 1000
The volume name 'data_vol' is mounted to the container path '/app/data' using -v data_vol:/app/data.
Fix the error in the command to run a second container 'app2' sharing the same volume 'data_vol' at '/app/data'.
docker run -d --name app2 -v [1]:/app/data alpine sleep 1000
The volume name 'data_vol' should be specified before the colon without repeating the path.
Fill both blanks to create a Docker Compose service 'app1' that uses the volume 'data_vol' mounted at '/app/data'.
version: '3.8'\nservices:\n app1:\n image: alpine\n command: sleep 1000\n volumes:\n - [1]:[2]\nvolumes:\n data_vol: {}
The volume 'data_vol' is mounted to the container path '/app/data' in the Docker Compose file.
Fill all three blanks to define a Docker Compose file with two services 'app1' and 'app2' sharing the volume 'shared_vol' mounted at '/data' in both containers.
version: '3.8'\nservices:\n app1:\n image: alpine\n command: sleep 1000\n volumes:\n - [1]:[2]\n app2:\n image: alpine\n command: sleep 1000\n volumes:\n - [3]:[2]\nvolumes:\n shared_vol: {}
Both services use the same volume 'shared_vol' mounted at '/data'. The volume name is repeated for both services.