Pages

Showing posts with label docker. Show all posts
Showing posts with label docker. Show all posts

Thursday, August 3, 2023

docker and vm glossary

namespace = used for isolating one docker container  with other



// fungsi :

restrict container access and visibility

to other resources on system




=======

docker images :


lightweight, standalone, executable packages that include everything u need to run a piece of software



^ code for software, runtime, system tools and library  



=======



docker file :


- simple document that provide instruction for creating image



========



docker container :


- instances of images that run in the docker engine 





^ tiap container terisolasi dan cuma memiliki environtment that includes only the necessary components.


========






klo di vm ada hypervisor type 1 // baremetal 

- run directly on host hardware 



ada jg hypervisor type 2  // hosted hypervisor

- run directly on top of an existing operating system






virtual hardware :   - emulated components of a VM


terdiri dari virtual cpu, virtual memory, virtual storage, virtual network interfaces 





hypervisor responsibility is for managing and allocating these virtual resources to each VM







guest OS = individual OS that run inside each VM 


========



vm use case :

- diverse operating system on 1 physical hardware 

- 1 running linux, 1 running windows

- isolation  // separate kernel and separate OS

- suited for running legacy aplication that rely on specific OS Version / configuration



docker use case :

- ideal for microservices 

- fast startup times 

- ability to package and distribute dependencies

- rapid development and deployment. ability to use docker container to quickly build deploy and scaleup

- smaller footprint than vm / resource efficiency  == more container able to run on the same piece of hardware with less overhead 





Wednesday, September 7, 2016

docker documentation

docker

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