Basic Knowledge About The Docker Flow
Basic Knowledge About The Docker Flow
docker info | grep more #to check which store drive is docker using
docker run -ti <image_id> bash #to enter into the container like a
terminal emulator
or
docker run --rm -ti <container_id> <command> #to run a command inside the
container without enter in it
docker exec -ti <container_id> bash #to start a shell of that container
docker run = docker will pull the image and later start the container
–name = name of the docker container I choose
-p3128:3128 = exposed port 3128 : internal port 3128
b4tman/squid = the image of docker with squid preinstalled
logs
docker logs <container_name> #to check container logs
resource constraints
docker run -- memory maximum-allowed-memory <image_name> <command>
networking
expose = open a port from the container to the external
docker tun --rm -ti -p 8080:8080 -p 8081:8081 --name <container_name_i_choose>
ubuntu:14.04 bash
nc -lp 8080 | nc -lp 8081 #to send data with netcat from
port 8080 to 8081
#sample
#host = when you want the container not have any isolation at all
#none
images
docker images #to list downloaded images