Skip to content

Commit 7b06f34

Browse files
committed
Apply markdownfmt
1 parent af8eb27 commit 7b06f34

File tree

2 files changed

+16
-47
lines changed

2 files changed

+16
-47
lines changed

node/content.md

Lines changed: 15 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -29,76 +29,48 @@ $ docker run -it --rm --name my-running-app my-nodejs-app
2929

3030
### Notes
3131

32-
The image assumes that your application has a file named
33-
[`package.json`](https://docs.npmjs.com/files/package.json) listing its
34-
dependencies and defining its [start
35-
script](https://docs.npmjs.com/misc/scripts#default-values).
32+
The image assumes that your application has a file named [`package.json`](https://docs.npmjs.com/files/package.json) listing its dependencies and defining its [start script](https://docs.npmjs.com/misc/scripts#default-values).
3633

3734
It also assumes that you have a file named [`.dockerignore`](https://docs.docker.com/engine/reference/builder/#/dockerignore-file) otherwise it will copy your local npm modules:
3835

39-
```
40-
node_modules
41-
```
36+
node_modules
4237

4338
We have assembled a [Best Practices Guide](https://github.com/nodejs/docker-node/blob/master/docs/BestPractices.md) for those using these images on a daily basis.
4439

45-
All of the images contain pre-installed versions of `node`,
46-
[`npm`](https://www.npmjs.com/), and [`yarn`](https://yarnpkg.com). For each
47-
supported architecture, the supported variants are different. In the file
48-
[architectures](https://github.com/nodejs/docker-node/blob/master/architectures),
49-
it lists all supported variants for all of the architectures that we support now.
40+
All of the images contain pre-installed versions of `node`, [`npm`](https://www.npmjs.com/), and [`yarn`](https://yarnpkg.com). For each supported architecture, the supported variants are different. In the file [architectures](https://github.com/nodejs/docker-node/blob/master/architectures), it lists all supported variants for all of the architectures that we support now.
5041

5142
## Run a single Node.js script
5243

53-
For many simple, single file projects, you may find it inconvenient to write a
54-
complete `Dockerfile`. In such cases, you can run a Node.js script by using the
55-
Node.js Docker image directly:
44+
For many simple, single file projects, you may find it inconvenient to write a complete `Dockerfile`. In such cases, you can run a Node.js script by using the Node.js Docker image directly:
5645

5746
```console
5847
$ docker run -it --rm --name my-running-script -v "$PWD":/usr/src/app -w /usr/src/app node:4 node your-daemon-or-script.js
5948
```
6049

6150
## Verbosity
6251

63-
By default the Node.js Docker Image has npm log verbosity set to `info` instead
64-
of the default `warn`. This is because of the way Docker is isolated from the
65-
host operating system and you are not guaranteed to be able to retrieve the
66-
`npm-debug.log` file when npm fails.
52+
By default the Node.js Docker Image has npm log verbosity set to `info` instead of the default `warn`. This is because of the way Docker is isolated from the host operating system and you are not guaranteed to be able to retrieve the `npm-debug.log` file when npm fails.
6753

68-
When npm fails, it writes it's verbose log to a log file inside the container.
69-
If npm fails during an install when building a Docker Image with the `docker
70-
build` command, this log file will become inaccessible when Docker exits.
54+
When npm fails, it writes it's verbose log to a log file inside the container. If npm fails during an install when building a Docker Image with the `docker build` command, this log file will become inaccessible when Docker exits.
7155

72-
The Docker Working Group have chosen to be overly verbose during a build to
73-
provide an easy audit trail when install fails. If you prefer npm to be less
74-
verbose you can easily reset the verbosity of npm using the following
75-
techniques:
56+
The Docker Working Group have chosen to be overly verbose during a build to provide an easy audit trail when install fails. If you prefer npm to be less verbose you can easily reset the verbosity of npm using the following techniques:
7657

7758
### Dockerfile
7859

79-
If you create your own `Dockerfile` which inherits from the `node` image you can
80-
simply use `ENV` to override `NPM_CONFIG_LOGLEVEL`.
60+
If you create your own `Dockerfile` which inherits from the `node` image you can simply use `ENV` to override `NPM_CONFIG_LOGLEVEL`.
8161

82-
```
83-
FROM node
84-
ENV NPM_CONFIG_LOGLEVEL warn
85-
...
86-
```
62+
FROM node
63+
ENV NPM_CONFIG_LOGLEVEL warn
64+
...
8765

8866
### Docker Run
8967

90-
If you run the node image using `docker run` you can use the `-e` flag to
91-
override `NPM_CONFIG_LOGLEVEL`.
68+
If you run the node image using `docker run` you can use the `-e` flag to override `NPM_CONFIG_LOGLEVEL`.
9269

93-
```
94-
$ docker run -e NPM_CONFIG_LOGLEVEL=warn node ...
95-
```
70+
$ docker run -e NPM_CONFIG_LOGLEVEL=warn node ...
9671

9772
### NPM run
9873

99-
If you are running npm commands you can use `--loglevel` to control the
100-
verbosity of the output.
74+
If you are running npm commands you can use `--loglevel` to control the verbosity of the output.
10175

102-
```
103-
$ docker run node npm --loglevel=warn ...
104-
```
76+
$ docker run node npm --loglevel=warn ...

node/license.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
[License information](https://github.com/nodejs/node/blob/master/LICENSE) for
2-
the software contained in this image. [License
3-
information](https://github.com/nodejs/docker-node/blob/master/LICENSE) for the
4-
Node.js Docker project.
1+
View [license information](https://github.com/nodejs/node/blob/master/LICENSE) for Node.js or [license information](https://github.com/nodejs/docker-node/blob/master/LICENSE) for the Node.js Docker project.

0 commit comments

Comments
 (0)