@@ -104,28 +104,20 @@ $ docker run -it --rm --name my-running-script -v "$PWD":/usr/src/app -w /usr/sr
104
104
105
105
## Verbosity
106
106
107
- By default the Node.js Docker Image has npm log verbosity set to ` info ` instead
108
- of the default ` warn ` . This is because of the way Docker is isolated from the
109
- host operating system and you are not guaranteed to be able to retrieve the
110
- ` npm-debug.log ` file when npm fails.
111
-
112
- When npm fails, it writes it's verbose log to a log file inside the container.
113
- If npm fails during an install when building a Docker Image with the `docker
114
- build` command, this log file will become inaccessible when Docker exits.
115
-
116
- The Docker Working Group have chosen to be overly verbose during a build to
117
- provide an easy audit trail when install fails. If you prefer npm to be less
118
- verbose you can easily reset the verbosity of npm using the following
119
- techniques:
107
+ Prior to 8.7.0, 6.11.4 and 4.8.4 the docker images overrode the default npm log
108
+ level from ` warn ` to ` info ` . However due to improvements to npm and new Docker
109
+ patterns (e.g. multi-stage builds) the working group reached a [ consensus] ( https://github.com/nodejs/docker-node/issues/528 )
110
+ to revert the log level to npm defaults. If you need more verbose output, please
111
+ use one of the following methods to change the verbosity level.
120
112
121
113
### Dockerfile
122
114
123
115
If you create your own ` Dockerfile ` which inherits from the ` node ` image you can
124
116
simply use ` ENV ` to override ` NPM_CONFIG_LOGLEVEL ` .
125
117
126
- ```
118
+ ``` dockerfile
127
119
FROM node
128
- ENV NPM_CONFIG_LOGLEVEL warn
120
+ ENV NPM_CONFIG_LOGLEVEL info
129
121
...
130
122
```
131
123
@@ -135,7 +127,7 @@ If you run the node image using `docker run` you can use the `-e` flag to
135
127
override ` NPM_CONFIG_LOGLEVEL ` .
136
128
137
129
```
138
- $ docker run -e NPM_CONFIG_LOGLEVEL=warn node ...
130
+ $ docker run -e NPM_CONFIG_LOGLEVEL=info node ...
139
131
```
140
132
141
133
### NPM run
0 commit comments