Podman/기본 명령어
Podman 기본 명령어
소극침주'
2023. 9. 21. 16:09
작성일자 2023-09-19



OS 환경 : Rocky Linux release 9.2 (Blue Onyx)
설치할 패키지 정보 확인
dnf info podman

패키지 설치
dnf install -y podman
설치된 패키지 정보 확인
podman version

서비스 시작
systemctl start podman
서비스 구동 확인
systemctl status podman
재부팅 시 서비스 자동 구동
systemctl enable podman
설치가능한 이미지 확인
podman search "이미지명"
ex ) nginx 이미지 설정 ( podman search nginx)
pull 명령으로 이미지 받기
podman pull "이미지명":"버전"
ex ) podman pull nginx:latest
받은 이미지 확인
podman images

이미지 삭제하기
podman rmi "이미지 이름":"태그"
ex) podman rmi docker.io/library/ubuntu:latest
컨테이너 생성하기
podman run -i -t --name hello nginx /bin/bash
컨테이너 리스트 확인하기
podman ps -a
컨테이너 삭제하기
podman ps -a 명령어를 통하여 CONTAINER ID 확인
podman rm "CONTAINER ID"
ex) podman rm 022481dc01a9
컨테이너 시작하기, 재시작 하기
podman start hello
podman stop hello
podman restart hello
컨테이너에 접속하기
podman attach hello
* Ctrl+P, Ctrl + Q 로 컨테이너에서 나와야 컨테이너가 종료되지 않는다