https://github.com/phase2/docker-node
Node image for a JavaScript based server side platform
https://github.com/phase2/docker-node
docker-image nodejs outrigger
Last synced: 20 days ago
JSON representation
Node image for a JavaScript based server side platform
- Host: GitHub
- URL: https://github.com/phase2/docker-node
- Owner: phase2
- License: mit
- Created: 2017-02-22T20:33:41.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2019-11-07T13:54:50.000Z (over 6 years ago)
- Last Synced: 2025-01-12T17:36:27.734Z (over 1 year ago)
- Topics: docker-image, nodejs, outrigger
- Language: Dockerfile
- Size: 26.4 KB
- Stars: 0
- Watchers: 7
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Outrigger Node
> Node image for a JavaScript server side platform.
[](https://github.com/phase2/docker-node)
[](https://hub.docker.com/r/outrigger/node)
[](https://hub.docker.com/r/outrigger/node)
[](https://microbadger.com/images/outrigger/node "Get your own image badge on microbadger.com")
For more documentation on how Outrigger images are constructed and how to work
with them, please [see the documentation](http://docs.outrigger.sh/).
## Node <= v6
Based on outrigger/servicebase, which provides a CentOS-base, s6 init system
and confd configuration templating.
## Node v8, v10
Based on official Node images, specifically the Alpine variant, and
adds special functionality on top. Currently that includes:
* tini init system
* Coordinated support for Yarn and npm
* Run services as the `node` user instead of as `root`.
We have switched to a simple templating mechanism to ease support for multiple node versions, assuming we want to handle future node versions in a manner identical
to v8.
## Usage Example
The examples in this repo use Yarn, but you can use npm as well.
### Docker Run - Node REPL
```bash
docker run --rm -it outrigger/node:8
```
### Docker Compose - Project-style
For a more thorough example of how you would use outrigger/node:2-node8 or greater
in a "real" project, check out ./examples.
```yaml
api: '3.4'
services:
app:
image: outrigger/node:8
container_name: projectname_app
command: "yarn install && yarn start"
labels:
com.dnsdock.name: app
com.dnsdock.image: projectname
network_mode: bridge
volumes:
- .:/code
```
### Node v4 and v6
In the current version of Node v4 and v6, npm install and start routines are
built-in to the image. This makes them more project-centric out of the box.
```bash
docker run --rm -v ~/Project/node-app:/code outrigger/node:6
```
## Environment Variables
Outrigger images use Environment Variables and [confd](https://github.com/kelseyhightower/confd)
to "templatize" a number of Docker environment configurations. These templates are
processed on startup with environment variables passed in via the docker run
command-line or via your docker-compose manifest file. Here are the "tunable"
configurations offered by this image.
This only applies to Node v4 and v6.
* `SKIP_NPM_INSTALL`: If this is set (to anything) it will not run `npm install` when the container boots.
## Security Reports
Please email outrigger@phase2technology.com with security concerns.
## Maintainers
[](https://www.phase2technology.com)