docker command

Published by onesixx on

docker의 container는 os를 hosting하려는 것이 아니라, (webserver, db 등의 instance를 hosting하는 것처럼)
특정 task나 process를 실행하는 것이다.

https://identity.kodekloud.com/sign-in

docker 명령

Dockerfile → (Build) → Image → (Create) → Container

  1. docker build: Dockerfile을 사용하여 이미지생성.
  2. docker pull: Docker Hub등에서 이미지를 다운
  3. docker run: 이미지를 기반으로 컨테이너를 생성하고 실행.
  4. docker ps: 실행 중인 컨테이너 목록을 표시
  5. docker stop: 실행 중인 컨테이너를 중지.
  6. docker rm: 컨테이너를 삭제.
  7. docker rmi: 이미지를 삭제.
    commandcontainer상태기능사용예
    run새로운 container생성/실행새로운 container 시작
    (attach모드/ detach모드:background)
    exec실행중인container내부명령 실행container내부에서 추가작업 수행
    attach실행중인container 연결container 상태 모니터링 디버깅
    Categories: Tool-SW

    onesixx

    Blog Owner

    Subscribe
    Notify of
    guest

    0 Comments
    Oldest
    Newest Most Voted
    Inline Feedbacks
    View all comments
    0
    Would love your thoughts, please comment.x
    ()
    x