Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

■ 호스트와 바인딩 된 포트를 확인

Code Block
# docker port {containerName}
80/tcp > 0.0.0.0:3333

3333포트는  80/tcp 에서 0.0.0.0은 호스트의 활용 가능한 모든 네트워크 인터페이스에 바인딩을 함.

docker

Docker ps 커스텀 테이블 보기

Code Block
# docker ps --format "table {{.ID}}\t{{.Status}}"


■ Docker 로그

Code Block
# docker logs {containerName}
# docker logs -f {containerName}
# docker logs --tail 2 {containerName}


# cat /var/lib/docker/containers/${container_ID}/#{container_ID}-json.log