https://github.com/hopsoft/docker-nodejs
Docker image for NodeJS
https://github.com/hopsoft/docker-nodejs
Last synced: about 2 months ago
JSON representation
Docker image for NodeJS
- Host: GitHub
- URL: https://github.com/hopsoft/docker-nodejs
- Owner: hopsoft
- License: mit
- Created: 2013-11-17T03:18:27.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2014-06-23T17:09:48.000Z (over 11 years ago)
- Last Synced: 2025-04-04T03:43:48.811Z (6 months ago)
- Language: Shell
- Size: 142 KB
- Stars: 2
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Docker Image for NodeJS
## Building the Image
The notable files for building the Docker image are:
* `Dockerfile`
* `assets` - files copied to the image
* `build` - the build scriptThe majority of the install logic resides in the
[assets/build](https://github.com/hopsoft/docker-nodejs/blob/master/assets/build) script.
The intent is to mitigate issues that arise from
[stacking too many AUFS layers](https://github.com/dotcloud/docker/issues/1171).## Vagrant
This project ships with a `Vagrantfile` to simplify the process of using and/or building the image.
### Clone the Project
```
git clone https://github.com/hopsoft/docker-nodejs.git
cd docker-nodejs
```### Start the Virtual Machine & Login
*Note: Ports 3000, 4000, & 5000 are mapped between the host & the virtual machine.*
```
vagrant up
vagrant ssh
```### Build the Image
```
sudo docker build -t hopsoft/nodejs /vagrant
```### Use the Image
```
sudo docker run -i -t -p 3000:3000 hopsoft/nodejs bash
npm install -g echo-server
echo-server 3000
```Test from the host (or the virtual machine).
```
curl http://localhost:3000/foo/bar
```