Skip to content

Commit ae9a1e5

Browse files
author
Hans Kristian Flaatten
committed
doc(readme): copy README from nodejs/docker-iojs
Related: docker-library/docs#172 nodejs/docker-iojs#52 Signed-off-by: Hans Kristian Flaatten <[email protected]>
1 parent 184653e commit ae9a1e5

File tree

1 file changed

+94
-10
lines changed

1 file changed

+94
-10
lines changed

README.md

Lines changed: 94 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,105 @@
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+
*from [node.org/faq.html](https://node.org/faq.html)*
13+
14+
Node.js is a JavaScript platform built on Chrome's V8 runtime. This project
15+
began as a fork of Joyent's Node.js™ and is compatible with the npm ecosystem.
16+
17+
Why? Node.js aims to provide faster and predictable release cycles. It currently
18+
merges in the latest language, API and performance improvements to V8 while also
19+
updating libuv and other base libraries.
20+
21+
This project aims to continue development of Node.js under an "open governance
22+
model" as opposed to corporate stewardship.
23+
24+
## Usage
25+
26+
# How to use this image
27+
28+
If you want to distribute your application on the docker registry, create a
29+
`Dockerfile` in the root of application directory:
30+
31+
```Dockerfile
32+
FROM node:onbuild
33+
34+
# Expose the ports that your app uses. For example:
35+
EXPOSE 8080
36+
```
37+
38+
Then simply run:
39+
40+
```
41+
$ docker build -t node-app
42+
...
43+
$ docker run --rm -it node-app
44+
```
45+
46+
To run a single script, you can mount it in a volume under `/usr/src/app`. From
47+
the root of your application directory (assuming your script is named
48+
`index.js`):
49+
50+
```
51+
$ docker run -v ${PWD}:/usr/src/app -w /usr/src/app -it --rm node node index.js
52+
```
53+
54+
# Image Variants
55+
56+
The `node` images come in many flavors, each designed for a specific use case.
57+
58+
## `node:<version>`
59+
60+
This is the defacto image. If you are unsure about what your needs are, you
61+
probably want to use this one. It is designed to be used both as a throw away
62+
container (mount your source code and start the container to start your app), as
63+
well as the base to build other images off of. This tag is based off of
64+
[`buildpack-deps`](https://registry.hub.docker.com/_/buildpack-deps/).
65+
`buildpack-deps` is designed for the average user of docker who has many images
66+
on their system. It, by design, has a large number of extremely common Debian
67+
packages. This reduces the number of packages that images that derive from it
68+
need to install, thus reducing the overall size of all images on your system.
69+
70+
## `node:onbuild`
71+
72+
This image makes building derivative images easier. For most use cases, creating
73+
a `Dockerfile` in the base of your project directory with the line `FROM
74+
node:onbuild` will be enough to create a stand-alone image for your project.
75+
76+
## `node:slim`
77+
78+
This image does not contain the common packages contained in the default tag and
79+
only contains the minimal packages needed to run `node`. Unless you are working
80+
in an environment where *only* the Node.js image will be deployed and you have
81+
space constraints, we highly recommend using the default image of this
82+
repository.
83+
84+
# License
85+
86+
[License information](https://github.com/nodejs/node/blob/master/LICENSE) for
87+
the software contained in this image. [License
88+
information](https://github.com/nodejs/docker-node/blob/master/LICENSE) for the
89+
Node.js Docker project.
90+
91+
# Supported Docker versions
1092

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

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

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.
97+
# People
1898

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).
99+
Current Project Team Members:
21100

22-
**Note:** The previous (deprecated) repo can be found at https://github.com/docker-library/node
101+
* [@chorrell](https://github.com/chorrell)
102+
* [@hmalphettes](https://www.github.com/hmalphettes)
103+
* [@jlmitch5](https://www.github.com/jlmitch5)
104+
* [@pesho](https://www.github.com/pesho)
105+
* [@Starefossen](https://www.github.com/starefossen)
106+
* [@wblankenship](https://www.github.com/wblankenship)

0 commit comments

Comments
 (0)