[LINUX] Command list such as Docker / Kubernetes

A reminder of Docker / Kubernetes commands used for work and hobbies. You can also put information on various commands such as Linux that you will forget immediately if you do not use it. ..

Docker

command Overview Example
docker ps List of running containers Running: docker ps
Including end status: docker ps-a
docker images Display the image list held locally
docker rmi [id name] Delete local image If you can't delete it, docker rmi[id name] -Run with f
-f:Forced deletion
docker build [-t repository tag] Build image from Dockerfile
docker pull [Container image] Container imageのダウンロード
docker run [Container image] Container imageを指定して起動
docker run -it [image name] shell Launch a container and run an interactive shell docker run -it centos bash
docker logs [Container ID] Log display
docker hisotry [images ID] History to image
docker tag local image name:Tag remote repository:Tag name Tag the image of the local repository to the remote repository name
docker push tagged remote repository name Registration to remote repository
docker commit containerID image:tag Registering container image
docker start containerID Start of container
docker stop containerID Stop container
docker stop $(docker ps -q) Stop all running containers
docker network ls List container networks
docker network inspect [networkID] View advanced container network settings
docker network create [Network name] Create a new container network docker network create mynet1
docker built -t image name:tag name PATH name of Dockerfile Creating a Docker image docker build --tag mydaemon:0.1 ./Dockerfile

Kubernetes

command Overview
docker ps List of running containers
TD TD
TD TD

Linux

It is almost an example of Cent0S.

Cent0S

command Overview Example
systemctl list-unit-files -t service Check service list and auto start settings(Old chkconfig--list)
cat /etc/redhat-release Version confirmation
yum list installed Check the list installed by yum
nslookup dns(ip) Name resolution query to DNS server
pubcopy Copy the contents of cli to the clipboard pbcopy <~/.ssh/id_ed25519.pub

ssh config file

reference

Docker reference https://docs.docker.com/engine/reference/commandline/build/

Docker command cheat sheet https://qiita.com/wMETAw/items/34ba5c980e2a38e548db

awk command https://www.atmarkit.co.jp/ait/articles/1706/08/news015.html

Recommended Posts

Command list such as Docker / Kubernetes
Linux command list
Django + Docker command
Docker command summary
Get information such as GPU usage from Python (nvidia-smi command)
pyenv pipenv Related command list
Docker command super abbreviated version
List of self-made Docker images