본문 바로가기
Engineering/OS -Linux, Windows, EXSi

자주 사용하는 docker 명령어(command)

by 알탱2 2021. 12. 19.
반응형

docker container 생성/실행/종료/삭제

# Create and Run
docker run -it -p 8888:8888 --name test-container -v /home/:/home/ centos/python-38-centos7:latest /bin/bash

# Stop
docker stop test-container

# Remove
docker rm test-container

 

docker container 진입

# Bash
docker exec -it test-container bash

# Resize Window
docker exec -it -e COLUMNS=200 -e LINES=100  test-container bash

# postgresql (docker image -> postgres:latest)
docker exec -it test-postgre psql -U userid -d databasename

 

docker log 확인

docker logs test-container --tail 10 -f

 

 

docker file root path 확인

docker info | grep Root
반응형

댓글