Skip to content
This repository was archived by the owner on Jun 12, 2018. It is now read-only.

Commit f7942dc

Browse files
committed
Version 6.7
1 parent 8f168d0 commit f7942dc

5 files changed

Lines changed: 10 additions & 29 deletions

File tree

Dockerfile

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,20 @@
22
# Node JS image
33
#
44

5-
FROM 1science/alpine:3.1
5+
FROM 1science/alpine:3.4
66

7-
# Node and NPM version
8-
ENV NODE_VERSION=6.3.1 NPM_VERSION=3.10.5
7+
# Node version
8+
ENV NODE_VERSION=6.7.0
99

10-
# Install Node and NPM
10+
# Install Node
1111
RUN apk update && apk-install make gcc g++ python linux-headers paxctl libgcc libstdc++ && \
1212
curl -sSL https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}.tar.gz | tar -xz && \
1313
cd /node-v${NODE_VERSION} && \
1414
./configure --prefix=/usr && \
1515
make -j$(grep -c ^processor /proc/cpuinfo 2>/dev/null || 1) && \
1616
make install && \
1717
paxctl -cm /usr/bin/node && \
18-
npm install -g npm@${NPM_VERSION} && \
19-
apk del make gcc g++ python linux-headers paxctl libgcc libstdc+ && \
18+
apk del make gcc g++ python linux-headers paxctl && \
2019
find /usr/lib/node_modules/npm -name test -o -name .bin -type d | xargs rm -rf && \
2120
rm -rf /node-v${NODE_VERSION} \
2221
/usr/share/man /tmp/* /var/cache/apk/* /root/.npm \

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2015 1science Devops Team <devops@1science.org>
1+
Copyright (c) 2016 1science Devops Team <devops@1science.org>
22

33
Permission to use, copy, modify, and distribute this software for any
44
purpose with or without fee is hereby granted, provided that the above

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ the root of your application directory (assuming your script is named
2222
`hello.js`):
2323

2424
```
25-
docker run -v ${PWD}:/app -w /app -it --rm 1science/node:4.2.2 node hello.js
25+
docker run -v ${PWD}:/app -w /app -it --rm 1science/node:6.7 node hello.js
2626
```
2727

consul/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#
22
# Node JS image with Consul Template and Fileconsul
33
#
4-
FROM 1science/node:5.11.0
4+
FROM 1science/node:6.7
55

6-
# Consul template and fileconsul for configuration management
7-
ENV S6_OVERLAY_VERSION=1.9.1.3 CONSUL_TEMPLATE_VERSION=0.11.0 FILECONSUL_VERSION=0.1.1
6+
# Consul template for configuration management
7+
ENV S6_OVERLAY_VERSION=1.18.1.5 CONSUL_TEMPLATE_VERSION=0.16.0
88

99
# Install S6 Overlay, Consul Template and Fileconsul
1010
RUN curl -Ls https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-amd64.tar.gz | tar -xz -C / && \

consul/README.md

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ This image inherits from the ```1science/node``` image adding support to manage
55
It includes :
66
- [S6 Overlay](https://github.com/just-containers/s6-overlay) to properly manage multiple services in one container
77
- [Consul template](https://github.com/hashicorp/consul-template) to manage dynamic configuration based on Consul
8-
- [Fileconsul](https://github.com/foostan/fileconsul) an utility to synchronize files on Consul
98

109
# Usage
1110

@@ -26,23 +25,6 @@ FROM 1science/node:consul
2625
ADD etc/consul-template /etc/consul-template
2726
```
2827

29-
## Fileconsul
30-
31-
The following example use [Fileconsul](https://github.com/foostan/fileconsul) to synchronize configuration files with Consul:
32-
33-
```
34-
docker run --name node-consul \
35-
-e CONSUL_URL=localhost:8500 \
36-
-e FILECONSUL_PREFIX=app \
37-
-e FILECONSUL_DC=local \
38-
-e FILECONSUL_BASEPATH=/app/etc \
39-
-d 1science/node:consul
40-
```
41-
42-
This synchronize the configuration files in Consul defined in the KV folder ```app``` in the local directory ```/app/etc``` (see [fileconsul script](etc/periodic/1min/fileconsul)).
43-
44-
The Node process is in charge to detect the changes made in the ```/app/etc``` directory and [reload](http://stackoverflow.com/questions/1972242/auto-reload-of-files-in-node-js) the configuration.
45-
4628
# Build
4729

4830
This project is configured as an [automated build in Dockerhub](https://hub.docker.com/r/1science/node/).

0 commit comments

Comments
 (0)