1 개요[ | ]
- 카타코더 Docker - Create Data Containers
- 카타코더 Docker - Data Containers
2 Create Container[ | ]
Console
Copy
$ ll
total 16
drwxr-xr-x 1 scrapbook scrapbook 4096 Mar 23 07:20 ./
drwxr-xr-x 1 scrapbook scrapbook 4096 Jan 10 10:12 ../
-rw-r--r-- 1 root root 10 Mar 23 07:20 config.conf
Console
Copy
$ docker create -v /config --name dataContainer busybox
Unable to find image 'busybox:latest' locally
latest: Pulling from library/busybox
697743189b6d: Pull complete
Digest: sha256:061ca9704a714ee3e8b80523ec720c64f6209ad3f97c0ff7cb9ec7d19f15149f
Status: Downloaded newer image for busybox:latest
20ebfda69c18a77eb1581bd818e9a7a76e215cb21264049d0bb5269da27343eb
3 Copy Files[ | ]
Console
Copy
$ docker cp config.conf dataContainer:/config/
$
4 Mount Volumes From[ | ]
Console
Copy
$ docker run --volumes-from dataContainer ubuntu ls /config
config.conf
5 Export / Import Containers[ | ]
Console
Copy
$ docker export dataContainer > dataContainer.tar
$ docker import dataContainer.tar
sha256:ea07c55e972a093c3c178a16ed938051a2dca2873e8c556230fcef216131469f
6 같이 보기[ | ]
편집자 Jmnote
로그인하시면 댓글을 쓸 수 있습니다.