728x90
반응형
자주사용하는 도커 명령어에 대해 정리해 보았습니다.
Docker Volume 명령어
docker volume create test-volume
docker volume ls
docker volume inspect test-volume
docker volume rm test-volume
docker volume 생성
[oracle-docker@minsvr:/data1/oracle-docker/oradata]$ docker volume create test-volume
test-volume
test-volume
docker volume list 확인
[oracle-docker@minsvr:/data1/oracle-docker/oradata]$ docker volume ls
DRIVER VOLUME NAME
local compose_config_files
local compose_db
local compose_django
local django-on-docker_media_volume
local django-on-docker_postgres_data
local django-on-docker_static_volume
local oracle-docker_oradata
local qms-on-docker_media_volume
local qms-on-docker_postgres_data
local qms-on-docker_static_volume
local test-volume
DRIVER VOLUME NAME
local compose_config_files
local compose_db
local compose_django
local django-on-docker_media_volume
local django-on-docker_postgres_data
local django-on-docker_static_volume
local oracle-docker_oradata
local qms-on-docker_media_volume
local qms-on-docker_postgres_data
local qms-on-docker_static_volume
local test-volume
docker volume 정보 확인
[oracle-docker@minsvr:/data1/oracle-docker/oradata]$ docker volume inspect test-volume
[
{
"CreatedAt": "2022-03-18T19:29:25+09:00",
"Driver": "local",
"Labels": {},
"Mountpoint": "/data300G/docker-image/volumes/test-volume/_data",
"Name": "test-volume",
"Options": {},
"Scope": "local"
}
]
[
{
"CreatedAt": "2022-03-18T19:29:25+09:00",
"Driver": "local",
"Labels": {},
"Mountpoint": "/data300G/docker-image/volumes/test-volume/_data",
"Name": "test-volume",
"Options": {},
"Scope": "local"
}
]
docker volume 삭제
[oracle-docker@minsvr:/data1/oracle-docker/oradata]$ docker volume rm test-volume
test-volume
[oracle-docker@minsvr:/data1/oracle-docker/oradata]$ docker volume ls
DRIVER VOLUME NAME
local compose_config_files
local compose_db
local compose_django
local django-on-docker_media_volume
local django-on-docker_postgres_data
local django-on-docker_static_volume
local oracle-docker_oradata
local qms-on-docker_media_volume
local qms-on-docker_postgres_data
local qms-on-docker_static_volume
test-volume
[oracle-docker@minsvr:/data1/oracle-docker/oradata]$ docker volume ls
DRIVER VOLUME NAME
local compose_config_files
local compose_db
local compose_django
local django-on-docker_media_volume
local django-on-docker_postgres_data
local django-on-docker_static_volume
local oracle-docker_oradata
local qms-on-docker_media_volume
local qms-on-docker_postgres_data
local qms-on-docker_static_volume
Docker 컨테이너 모두 중지 및 삭제
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
9cffbff6ec74 oracle/database:19.3.0-ee "/bin/sh -c 'exec $O 24 hours ago Up 49 minutes (healthy) 0.0.0.0:1521->1521/tcp, :::1521->1521/tcp, 0.0.0.0:5500->5500/tcp, :::5500->5500/tcp ora19c
$ docker ps -a -q
9cffbff6ec74
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
9cffbff6ec74 oracle/database:19.3.0-ee "/bin/sh -c 'exec $O 24 hours ago Up 49 minutes (healthy) 0.0.0.0:1521->1521/tcp, :::1521->1521/tcp, 0.0.0.0:5500->5500/tcp, :::5500->5500/tcp ora19c
$ docker ps -a -q
9cffbff6ec74
Docker Image 모두 삭제
docker rmi $(docker images -q)
Docker Image 리스트 확인
[oracle-docker@minsvr:/data1/oracle-docker]$ docker image ls
REPOSITORY TAG IMAGE ID CREATED SIZE
192.168.17.83:5000/oracle/database 19.3.0-ee_v2 7a2299cca529 46 minutes ago 6.97GB
oracle/database 19.3.0-ee a5a30da1721d 3 weeks ago 6.54GB
oraclelinux 7-slim 4133e87bc7fa 2 months ago 132MB
apache/ozone-runner 20200625-1 f6874ac36a4c 21 months ago 1.07GB
tomcat 8.5.46-jdk8-openjdk 8973f493aa0a 2 years ago 508MB
[oracle-docker@minsvr:/data1/oracle-docker]$ docker images -q
7a2299cca529
a5a30da1721d
4133e87bc7fa
f6874ac36a4c
8973f493aa0a
REPOSITORY TAG IMAGE ID CREATED SIZE
192.168.17.83:5000/oracle/database 19.3.0-ee_v2 7a2299cca529 46 minutes ago 6.97GB
oracle/database 19.3.0-ee a5a30da1721d 3 weeks ago 6.54GB
oraclelinux 7-slim 4133e87bc7fa 2 months ago 132MB
apache/ozone-runner 20200625-1 f6874ac36a4c 21 months ago 1.07GB
tomcat 8.5.46-jdk8-openjdk 8973f493aa0a 2 years ago 508MB
[oracle-docker@minsvr:/data1/oracle-docker]$ docker images -q
7a2299cca529
a5a30da1721d
4133e87bc7fa
f6874ac36a4c
8973f493aa0a
728x90
반응형
'02.Docker > Docker' 카테고리의 다른 글
[Docker] Docker 사용 시 에러 해결 모음 (0) | 2024.08.28 |
---|---|
[docker-compose] docker-compose 란? (1) | 2022.04.05 |
Docker 설치 (0) | 2022.03.20 |
사용자 계정에서 Docker Command 사용 방법 (0) | 2022.02.22 |