Cloud-Native

Master Cloud-Native infrastructure with Kubernetes

I) Learning Docker (best *****)




I) Learning Docker

-ti = terminal interactive


docker run -ti ubuntu:latest bash

cat /etc/lsb-release = which distribution

docker ps -format $FORMAT => which docker ... running

docker ps -l => the last docker exited

docker commit ID => new image id

docker tag imageID my-image

docker run --rm -ti ubuntu sleep 5 => --rm to remove after using

docker run -ti ubuntu bash -c "sleep 3; echo all done"" => -c : some commands

docker run -d -ti ubuntu bash => -d is detached run in background => docker attach nameDocker => ctrl+p /q

docker logs continaers_name

-p => publish

nc -lp

docker images