Docker study notes

It's a memorandum of studying and researching because I'm using Docker for the first time. If there is something I have researched or learned, I will add it as needed.

Docker command memo

docker container run Docker image name execute command
①            ②              ③

① Create and execute a container 2 Original docker image ③ Command to be executed in the container

Check version

docker version

Execution status check

docker system info

Disk usage

docker system df

Image download (Nginx)

docker pull nginx

Launch Nginx with image

docker container run --name webserber -d -p 80:80 nginx

Check the status of the server

docker container ps

Detailed confirmation of container

docker container status webserber

Stop the server

docker stop webserber

Start the server

docker start webserber

Search nginx images from docker hub

docker search nginx

Delete image

docker image rm image name

Creating a container

docker container create 

Create / start container

docker container run 

Interactive execution

docker container run -it --name "test1" centos /bin/cal

Background execution

docker container run -d centos /bin/ping localhost

Port mapping

docker container run -d -p 8080:80 nginx

Delete unnecessary images (none guy)

docker rmi $(docker images -f dangling=true -q)

Enter the container

docker exec -i -t container name bash

Build by specifying a file

docker build -f Dockerfile path-t image name.

Do not use cache

docker build -f Dockerfile path-t image name. --no-cache

Recommended Posts

Docker study notes
[wip] Docker notes
JavaFX study notes
[Java] Study notes
python notes on docker
Ruby study notes (puts)
Maven basic study notes
Ruby study notes (variables & functions)
docker
Internal class and lambda study notes
Docker related commands (notes for yourself)
docker memo
kubernetes + docker
spring × docker
About Docker
JUnit 4 notes
Docker Intellij
Study policy
java notes
Docker installation
Spring Framework study notes [Part 1] DI container
About Docker
Docker command
Docker memorandum
synchronized notes
Understand Docker
Docker memorandum