Skip to content

Commit 4458879

Browse files
committed
notes 2 added
1 parent 8e4b5e2 commit 4458879

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

docker-process-approach/docker-3.md

+14-1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ This command stand for "print working directory", and shortens your keystrokes,
2323
* When making a new volume for a mysql container, where could you look to see where the data path should be located in the container?
2424
ANSWER: Docker Hub
2525

26+
* VOLUME commans in Dockerfile.
27+
2628
```
2729
docker pull mysql
2830
@@ -38,7 +40,7 @@ docker volume ls
3840
3941
docker volume inspect TAB COMPLETION
4042
41-
docker container run -d --name2 mysql -e MYSQL_ALLOW_EMPTY_PASSWORD=True mysql
43+
docker container run -d --name mysql2 -e MYSQL_ALLOW_EMPTY_PASSWORD=True mysql
4244
4345
docker volume ls
4446
@@ -69,11 +71,22 @@ docker container run -d --name mysql3 -e MYSQL_ALLOW_EMPTY_PASSWORD=True -v mysq
6971
docker volume ls
7072
7173
docker container inspect mysql3
74+
or,
75+
docker volume inspect mysql-db
7276
7377
docker volume create --help
78+
To remove:
79+
docker container rm -f mysql
80+
7481
```
7582

7683
## Persistent Data: Bind Mounting
84+
* Maps a host file or directory to a container file or directory.
85+
* Basically just two locations pointing to the same files
86+
* Again skipping UFS and host files overwrite any containers
87+
* Cannot use in dockerfile, must be a ```container run```.
88+
* ...run -v /Users/codersh.stuff:/path/container
89+
7790
```
7891
cd dockerfile-sample-2
7992

0 commit comments

Comments
 (0)