woonizzooni

docker image 로그 확인 / docker build 과정 확인 / 도커 이미지 빌드 과정 로그 확인 본문

Docker

docker image 로그 확인 / docker build 과정 확인 / 도커 이미지 빌드 과정 로그 확인

woonizzooni 2021. 6. 15. 17:30

 

docker build 옵션 중 --progress 사용 (plain을 사용하자)

foo@bar:~/$ docker build --help

Usage:  docker build [OPTIONS] PATH | URL | -

Build an image from a Dockerfile

Options:
      ...
      --progress string         Set type of progress output (auto, plain, tty). Use plain to show container output (default "auto")
      ...

 

example) docker build -f Dockerfile --progress=plain -t ...

foo@bar:~/$ docker build -f Dockerfile --progress=tty -t repo:tag .
[+] Building 4.5s (5/14)
 => [internal] load build definition from Dockerfile                                                                                                          0.0s
 => => transferring dockerfile: 37B                                                                                                                           0.0s
 => [internal] load .dockerignore                                                                                                                             0.0s
 => => transferring context: 34B                                                                                                                              0.0s
 => [internal] load metadata for docker.io/library/node:16-alpine                                                                                             0.0s
 => CANCELED [internal] load build context                                                                                                                    4.4s
 => => transferring context: 109.16MB                                                                                                                         4.4s
 => [builder 1/8] FROM docker.io/library/node:16-alpine                                                                                                       0.0s
context canceled

foo@bar:~/$ docker build -f Dockerfile --progress=plain -t repo:tag .
#1 [internal] load build definition from Dockerfile
#1 sha256:daa760dcafd678e56ad9eb3ca29d4472197843fe15182f8e566a70cfda77f11d
#1 transferring dockerfile: 37B done
#1 DONE 0.0s
....
(내용 확인)

 

Comments