Skip to content

Commit

Permalink
nodejs 8.x upgrade (#22)
Browse files Browse the repository at this point in the history
* nodejs 8.x upgrade

* readme tweaks
  • Loading branch information
thescientist13 committed Apr 2, 2018
1 parent de0a5f3 commit 24ae412
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RUN apt-get install -yq gconf-service libasound2 libatk1.0-0 libc6 libcairo2 lib
ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget

# install NodeJS 6 LTS
RUN curl -sL https://deb.nodesource.com/setup_6.x | bash -
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash -
RUN apt-get install -y nodejs

# install latest [email protected]
Expand Down
29 changes: 23 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,33 @@ A [Docker][] image for [NodeJS][] development, primarily for the benefit of The
## Features
| Tool | Version | Notes |
|------|---------|-------|
| [NodeJS][] | ^6.0.0 | This is the current LTS version |
| [Yarn][] | ^1.0.0 | |
| [npm][] | ^1.0.0 | |
| [NodeJS][] | 8.x | This is the current LTS version |
| [Yarn][] | 1.x | |
| [npm][] | 5.x | |
| [Chrome Headless][] | N / A | Base image accounts for needed host packages needed to run Chrome Headless |

[NodeJS]: https://nodejs.org/en/download/
[npm]: https://www.npmjs.com/
[Yarn]: https://yarnpkg.com/en/
[Chrome Headless]: https://developers.google.com/web/updates/2017/04/headless-chrome

### Headless Chrome (Karma)
Include this in your _karma.conf.js_.

```javascript
browsers: ['CustomChromeHeadless'],
customLaunchers: {
CustomChromeHeadless: {
base: 'ChromeHeadless',
flags: ['--no-sandbox', '--disable-setuid-sandbox'] // https://github.com/Googlechrome/puppeteer/issues/290#issuecomment-322852784
}
},
captureTimeout: 210000, // https://github.com/jasmine/jasmine/issues/1413#issuecomment-334247097
browserDisconnectTolerance: 3,
browserDisconnectTimeout: 210000,
browserNoActivityTimeout: 210000,
```

## Development
Common Docker commands, generally used in development

Expand All @@ -35,7 +52,7 @@ My general workflow for testing has looked something like:
1. Run and connect to the container `docker run --name nodejs-dev-app -i -t nodejs-dev`
1. Make a scratch space `mkdir workspace && cd workspace`
1. Clone a repo `git clone https://github.com/thegreenhouseio/angular-webapp-seed.git`
1. Move into it `cd workspace` and test things out, like `yarn install && yarn run build`
1. Test things out, like `yarn install && yarn run build`
1. Disconnect from the contaier `exit`
1. Destroy the container `docker rm nodejs-dev-app`

Expand All @@ -54,8 +71,8 @@ Below are the steps to publish a new release of the image, based on this [guide]
* Hit Enter
* Enter Password
1. Build the image `docker build -t nodejs-dev .`
1. Tag the image `docker tag nodejs-dev thegreenhouse/nodejs-dev`
1. Push the image `docker push thegreenhouse/nodejs-dev`
1. Tag the image `docker tag nodejs-dev:latest thegreenhouse/nodejs-dev:x.y.z`
1. Push the image `docker push thegreenhouse/nodejs-dev:x.y.z`
1. Check the image [exists](https://hub.docker.com/r/thegreenhouse/nodejs-dev/tags/) in Docker Hub
1. Create a git tag `git tag -a x.y.z -m "tagging x.y.z release"
1. Push the tag `git push origin master --tags`

0 comments on commit 24ae412

Please sign in to comment.