2025-03-09 containerd nerdctl cheatcheet
containerd 를 처음 써보면서 nerdctl 이 생소해 적어놓는 cheatcheat docker cli 와 다른 부분을 중점적으로 적는다
developer from pamukkale
containerd 를 처음 써보면서 nerdctl 이 생소해 적어놓는 cheatcheat docker cli 와 다른 부분을 중점적으로 적는다
$remote_addr
: nginx로 요청을 보낸 client의 address 정보. LB, proxy 를 경유하게되면 마지막 장비의 IP 가 기록됨.
$http_x_forwarded_for
: nginx로 들어왔을 때 존재 하던 X-Forwarded-For 설정을 그대로 넘겨준다.
$proxy_add_x_forwarded_for
: nginx로 들어왔을 때 존재 하던 X-Forwarded-For 설정에 $remote_addr 값 추가
# Run command in a new container
nerdctl run
# Run a command in a running container
nerdctl exec
# Create a new container
nerdctl create
# Fetch container logs
nerdctl logs
# Start one or more running containers.
nerdctl start
# Stop one or more running containers.
nerdctl stop
# Restart one or more running containers.
nerdctl restart
# Remove one or more containers/images.
nerdctl rm/rmi
# Remove all stopped containers.
nerdctl container prune
# Build an image from a Dockerfile.
nerdctl build
# Pull/push an image from a registry.
nerdctl pull/push
# Create a new image from a container’s changes
nerdctl commit
# List images
nerdctl images
# Show the history of an image.
nerdctl image history
# Remove unused images.
nerdctl image purne
# Convert an image format. eg: nerdctl image convert [OPTIONS] SOURCE_IMAGE[:TAG] TARGET_IMAGE[:TAG]
nerdctl image convert
# ?
# Encrypt image layers
nerdctl image encrypt
# Log in to a container registry.
nerdctl login
# List networks
nerdctl network ls
# Display detailed information on one or more networks.
nerdctl network inspect
TODO
아래와 같이 설정 가능
View: Pods(
Place the value listed in Epic Color Value in the Epic Color field.