Skip to content

Commit 133a034

Browse files
committed
files uploaded
1 parent 59fe126 commit 133a034

File tree

4 files changed

+18
-0
lines changed

4 files changed

+18
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:6589d15833b7c299789d2795a156e1ef1a78db505baec22eb4df9d0a2439fc4e
3+
size 1491456
Binary file not shown.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
### Create a mount volume on Windows using the Command Prompt and attach it to a container:
2+
3+
1. Open the Command Prompt and navigate to the directory where you want to create the mount volume.
4+
2. Use the following command to create the mount volume:
5+
`docker volume create my_volume`
6+
Replace `my_volume` with the name you want to give to your volume.
7+
4. Run a container and attach the volume to it using the following command:
8+
`docker run -it --mount source=ca2_volume,target=/data alpine sh`
9+
This command runs an Alpine Linux container and attaches the `my_volume` volume to the `/data` directory inside the container. The `-it` option starts the container in interactive mode and opens a shell.
10+
6. Inside the container, create a file in the mounted volume using the following command:
11+
`echo "Hello World 12008698!" > /data/my_file.txt`
12+
7. Exit the container by typing `exit` in the shell.
13+
8. Check that the file exists in the mounted volume by using the following command:
14+
`docker run --rm -v ca2_volume:/data alpine ls /data`
15+
9. This command runs a temporary Alpine Linux container, mounts the "my_volume" volume to the `/data` directory inside the container, and lists the files in the ` /data` directory. You should see the "my_file.txt" file in the output.

0 commit comments

Comments
 (0)