Skip to content

Commit 5b84d14

Browse files
committed
Merge pull request #53 from Starefossen/doc/update-readme
Copy README.md from nodejs/docker-iojs
2 parents 6eea62a + 86a2703 commit 5b84d14

File tree

1 file changed

+89
-10
lines changed

1 file changed

+89
-10
lines changed

README.md

Lines changed: 89 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,100 @@
22

33
[![dockeri.co](http://dockeri.co/image/_/node)](https://registry.hub.docker.com/_/node/)
44

5-
[![issues](https://img.shields.io/github/issues/joyent/docker-node.svg) ![stars](https://img.shields.io/github/stars/joyent/docker-node.svg)](https://github.com/joyent/docker-node)
5+
[![GitHub issues](https://img.shields.io/github/issues/nodejs/docker-node.svg "GitHub issues")](https://github.com/nodejs/docker-node)
6+
[![GitHub stars](https://img.shields.io/github/stars/nodejs/docker-node.svg "GitHub stars")](https://github.com/nodejs/docker-node)
7+
8+
The official Node.js docker image, made with love by the node community.
69

710
## What is Node.js?
811

9-
Node.js is a platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.
12+
Node.js is a platform built on Chrome's JavaScript runtime for easily building
13+
fast, scalable network applications. Node.js uses an event-driven, non-blocking
14+
I/O model that makes it lightweight and efficient, perfect for data-intensive
15+
real-time applications that run across distributed devices.
16+
17+
See: http://nodejs.org
18+
19+
## Usage
20+
21+
# How to use this image
22+
23+
If you want to distribute your application on the docker registry, create a
24+
`Dockerfile` in the root of application directory:
25+
26+
```Dockerfile
27+
FROM node:onbuild
28+
29+
# Expose the ports that your app uses. For example:
30+
EXPOSE 8080
31+
```
32+
33+
Then simply run:
34+
35+
```
36+
$ docker build -t node-app
37+
...
38+
$ docker run --rm -it node-app
39+
```
40+
41+
To run a single script, you can mount it in a volume under `/usr/src/app`. From
42+
the root of your application directory (assuming your script is named
43+
`index.js`):
44+
45+
```
46+
$ docker run -v ${PWD}:/usr/src/app -w /usr/src/app -it --rm node node index.js
47+
```
48+
49+
# Image Variants
50+
51+
The `node` images come in many flavors, each designed for a specific use case.
52+
53+
## `node:<version>`
54+
55+
This is the defacto image. If you are unsure about what your needs are, you
56+
probably want to use this one. It is designed to be used both as a throw away
57+
container (mount your source code and start the container to start your app), as
58+
well as the base to build other images off of. This tag is based off of
59+
[`buildpack-deps`](https://registry.hub.docker.com/_/buildpack-deps/).
60+
`buildpack-deps` is designed for the average user of docker who has many images
61+
on their system. It, by design, has a large number of extremely common Debian
62+
packages. This reduces the number of packages that images that derive from it
63+
need to install, thus reducing the overall size of all images on your system.
64+
65+
## `node:onbuild`
66+
67+
This image makes building derivative images easier. For most use cases, creating
68+
a `Dockerfile` in the base of your project directory with the line `FROM
69+
node:onbuild` will be enough to create a stand-alone image for your project.
70+
71+
## `node:slim`
72+
73+
This image does not contain the common packages contained in the default tag and
74+
only contains the minimal packages needed to run `node`. Unless you are working
75+
in an environment where *only* the Node.js image will be deployed and you have
76+
space constraints, we highly recommend using the default image of this
77+
repository.
78+
79+
# License
80+
81+
[License information](https://github.com/nodejs/node/blob/master/LICENSE) for
82+
the software contained in this image. [License
83+
information](https://github.com/nodejs/docker-node/blob/master/LICENSE) for the
84+
Node.js Docker project.
85+
86+
# Supported Docker versions
1087

11-
See: [http://nodejs.org](http://nodejs.org)
88+
This image is officially supported on Docker version 1.8.3.
1289

13-
## About this Repo
90+
Support for older versions (down to 1.0) is provided on a best-effort basis.
1491

15-
This is the Git repo of the official Docker image for [node](https://registry.hub.docker.com/_/node/). See the
16-
Hub page for the full readme on how to use the Docker image and for information
17-
regarding contributing and issues.
92+
# People
1893

19-
The full readme is generated over in [docker-library/docs](https://github.com/docker-library/docs),
20-
specificially in [docker-library/docs/node](https://github.com/docker-library/docs/tree/master/node).
94+
Current Project Team Members:
2195

22-
**Note:** The previous (deprecated) repo can be found at https://github.com/docker-library/node
96+
* [@chorrell](https://github.com/chorrell)
97+
* [@hmalphettes](https://www.github.com/hmalphettes)
98+
* [@jlmitch5](https://www.github.com/jlmitch5)
99+
* [@pesho](https://www.github.com/pesho)
100+
* [@Starefossen](https://www.github.com/starefossen)
101+
* [@wblankenship](https://www.github.com/wblankenship)

0 commit comments

Comments
 (0)