docker - > see all command list
docker search [tutorial] -> search docker index for tutorial
docker pull learn/tutorial -> download image
You can think of containers as a process in a box. The box contains everything the process might need, so it has the filesystem, system libraries, shell and such, but by default none of these are running. You 'start' a container by running a process in it.
### abis didownload imagenya dirun!
docker run [image_name] [command_to_execute]
ex: docker run learn/tutorial echo “hello_world”
### install utilities like ping
docker run [image] [command]
docker run learn/tutorial apt-get install -y ping
### save changes / commiting. (save image with new state).
caranya ambil id dari container abs kita install ping trs di commit!
docker ps -l ## find id of the container created by installing ping
docke commit [3 angka awal dr id] [image/namabaru]
docker commit 698 learn/ping
###coba jalanin image yg udah terinstall ping
docker run learn/ping ping google.co.id
###cara liat running container
docker ps
docker inspect [id] -> print informasi tentang container
###docker bisa di push ke repo trus di share.
docker images -> print smua images yg dipake
docker push learn/ping
kita cm bisa ngepush image ke namespace diri sendiri.
####
https://hub.docker.com/ -> free docker hub account
https://docs.docker.com/installation -> install docker engines
No comments:
Post a Comment