Skip to content

Commit 08233cf

Browse files
authored
Merge pull request #15 from MOXGA-OSS/master
Merged from master
2 parents e42b886 + fbe9f46 commit 08233cf

File tree

9 files changed

+107
-37
lines changed

9 files changed

+107
-37
lines changed

Dockerfile

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2018 Finiz Open Source Software
1+
# Copyright 2019 Finiz Open Source Software
22

33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -41,8 +41,8 @@ RUN apk add nginx
4141
RUN rm -rf /etc/nginx/conf.d/default.conf
4242
ADD nginx/default.conf /etc/nginx/conf.d/default.conf
4343

44-
# Build Node.js 9.x
45-
ENV NODE_VERSION 9.8.0
44+
# Build Node.js 11.x
45+
ENV NODE_VERSION 11.9.0
4646

4747
RUN addgroup -g 1000 node \
4848
&& adduser -u 1000 -G node -s /bin/sh -D node \
@@ -58,23 +58,26 @@ RUN addgroup -g 1000 node \
5858
linux-headers \
5959
make \
6060
python \
61-
# gpg keys listed at https://github.com/nodejs/node#release-team
61+
# gpg keys listed at https://github.com/nodejs/node#release-keys
6262
&& for key in \
6363
94AE36675C464D64BAFA68DD7434390BDBE9B9C5 \
6464
FD3A5288F042B6850C66B31F09FE44734EB7990E \
6565
71DCFD284A79C3B38668286BC97EC7A07EDE3FC1 \
6666
DD8F2338BAE7501E3DD5AC78C273792F7D83545D \
6767
C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8 \
6868
B9AE9905FFD7803F25714661B63B535A4C206CA9 \
69-
56730D5401028683275BD23C23EFEFE93C4CFFFE \
7069
77984A986EBC2AA786BC0F66B01FBB92821C587A \
70+
8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600 \
71+
4ED778F539E3634C779C87C6D7062848A1AB005C \
72+
A48C2BEE680E841632CD4E44F07496B3EB3C1762 \
73+
B9E2F5981AA6E0CD28160D9FF13993A75599653C \
7174
; do \
72-
gpg --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" || \
73-
gpg --keyserver hkp://ipv4.pool.sks-keyservers.net --recv-keys "$key" || \
74-
gpg --keyserver hkp://pgp.mit.edu:80 --recv-keys "$key" ; \
75+
gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" || \
76+
gpg --batch --keyserver hkp://ipv4.pool.sks-keyservers.net --recv-keys "$key" || \
77+
gpg --batch --keyserver hkp://pgp.mit.edu:80 --recv-keys "$key" ; \
7578
done \
76-
&& curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION.tar.xz" \
77-
&& curl -SLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \
79+
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION.tar.xz" \
80+
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \
7881
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
7982
&& grep " node-v$NODE_VERSION.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
8083
&& tar -xf "node-v$NODE_VERSION.tar.xz" \
@@ -87,24 +90,25 @@ RUN addgroup -g 1000 node \
8790
&& rm -Rf "node-v$NODE_VERSION" \
8891
&& rm "node-v$NODE_VERSION.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt
8992

90-
# Build Yarn Package Manager 1.5.x
91-
ENV YARN_VERSION 1.5.1
93+
# Build Yarn Package Manager 1.13.x
94+
95+
ENV YARN_VERSION 1.13.0
9296

9397
RUN apk add --no-cache --virtual .build-deps-yarn curl gnupg tar \
9498
&& for key in \
9599
6A010C5166006599AA17F08146C2130DFD2497F5 \
96100
; do \
97-
gpg --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" || \
98-
gpg --keyserver hkp://ipv4.pool.sks-keyservers.net --recv-keys "$key" || \
99-
gpg --keyserver hkp://pgp.mit.edu:80 --recv-keys "$key" ; \
101+
gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" || \
102+
gpg --batch --keyserver hkp://ipv4.pool.sks-keyservers.net --recv-keys "$key" || \
103+
gpg --batch --keyserver hkp://pgp.mit.edu:80 --recv-keys "$key" ; \
100104
done \
101-
&& curl -fSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \
102-
&& curl -fSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz.asc" \
105+
&& curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \
106+
&& curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz.asc" \
103107
&& gpg --batch --verify yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \
104-
&& mkdir -p /opt/yarn \
105-
&& tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/yarn --strip-components=1 \
106-
&& ln -s /opt/yarn/bin/yarn /usr/local/bin/yarn \
107-
&& ln -s /opt/yarn/bin/yarn /usr/local/bin/yarnpkg \
108+
&& mkdir -p /opt \
109+
&& tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/ \
110+
&& ln -s /opt/yarn-v$YARN_VERSION/bin/yarn /usr/local/bin/yarn \
111+
&& ln -s /opt/yarn-v$YARN_VERSION/bin/yarnpkg /usr/local/bin/yarnpkg \
108112
&& rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \
109113
&& apk del .build-deps-yarn
110114

Dockerfile-LTS

Lines changed: 72 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2018 Finiz Open Source Software
1+
# Copyright 2019 Finiz Open Source Software
22

33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -41,11 +41,77 @@ RUN apk add nginx
4141
RUN rm -rf /etc/nginx/conf.d/default.conf
4242
ADD nginx/default.conf /etc/nginx/conf.d/default.conf
4343

44-
# Install Node.js 8.10.0 LTS and NPM
45-
RUN apk add --update-cache nodejs nodejs-npm --repository http://dl-3.alpinelinux.org/alpine/edge/main/
46-
47-
# Install Yarn Package Manager 1.5.1
48-
RUN apk add --update-cache yarn --repository http://dl-3.alpinelinux.org/alpine/edge/community/
44+
# Build Node.js 10.15.x
45+
46+
ENV NODE_VERSION 10.15.1
47+
48+
RUN addgroup -g 1000 node \
49+
&& adduser -u 1000 -G node -s /bin/sh -D node \
50+
&& apk add --no-cache \
51+
libstdc++ \
52+
&& apk add --no-cache --virtual .build-deps \
53+
binutils-gold \
54+
curl \
55+
g++ \
56+
gcc \
57+
gnupg \
58+
libgcc \
59+
linux-headers \
60+
make \
61+
python \
62+
# gpg keys listed at https://github.com/nodejs/node#release-keys
63+
&& for key in \
64+
94AE36675C464D64BAFA68DD7434390BDBE9B9C5 \
65+
FD3A5288F042B6850C66B31F09FE44734EB7990E \
66+
71DCFD284A79C3B38668286BC97EC7A07EDE3FC1 \
67+
DD8F2338BAE7501E3DD5AC78C273792F7D83545D \
68+
C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8 \
69+
B9AE9905FFD7803F25714661B63B535A4C206CA9 \
70+
77984A986EBC2AA786BC0F66B01FBB92821C587A \
71+
8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600 \
72+
4ED778F539E3634C779C87C6D7062848A1AB005C \
73+
A48C2BEE680E841632CD4E44F07496B3EB3C1762 \
74+
B9E2F5981AA6E0CD28160D9FF13993A75599653C \
75+
; do \
76+
gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" || \
77+
gpg --batch --keyserver hkp://ipv4.pool.sks-keyservers.net --recv-keys "$key" || \
78+
gpg --batch --keyserver hkp://pgp.mit.edu:80 --recv-keys "$key" ; \
79+
done \
80+
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION.tar.xz" \
81+
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \
82+
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
83+
&& grep " node-v$NODE_VERSION.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
84+
&& tar -xf "node-v$NODE_VERSION.tar.xz" \
85+
&& cd "node-v$NODE_VERSION" \
86+
&& ./configure \
87+
&& make -j$(getconf _NPROCESSORS_ONLN) \
88+
&& make install \
89+
&& apk del .build-deps \
90+
&& cd .. \
91+
&& rm -Rf "node-v$NODE_VERSION" \
92+
&& rm "node-v$NODE_VERSION.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt
93+
94+
# Build Yarn Package Manager 1.13.x
95+
96+
ENV YARN_VERSION 1.13.0
97+
98+
RUN apk add --no-cache --virtual .build-deps-yarn curl gnupg tar \
99+
&& for key in \
100+
6A010C5166006599AA17F08146C2130DFD2497F5 \
101+
; do \
102+
gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" || \
103+
gpg --batch --keyserver hkp://ipv4.pool.sks-keyservers.net --recv-keys "$key" || \
104+
gpg --batch --keyserver hkp://pgp.mit.edu:80 --recv-keys "$key" ; \
105+
done \
106+
&& curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \
107+
&& curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz.asc" \
108+
&& gpg --batch --verify yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \
109+
&& mkdir -p /opt \
110+
&& tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/ \
111+
&& ln -s /opt/yarn-v$YARN_VERSION/bin/yarn /usr/local/bin/yarn \
112+
&& ln -s /opt/yarn-v$YARN_VERSION/bin/yarnpkg /usr/local/bin/yarnpkg \
113+
&& rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \
114+
&& apk del .build-deps-yarn
49115

50116
# Add Node.js app
51117
COPY app /app

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
## Introduction
2-
This is an Alpine based container image running Nginx reversing proxy with Node v9.x (Yarn Support)
2+
This is an Alpine based container image running Nginx reversing proxy with Node v11.x (Yarn Support)
33

44
### Versioning
55
| Docker Tag | GitHub Release | Nginx Version | Node Version | Alpine Version |
66
|-----|-------|-----|--------|--------|
7-
| latest | master | 1.12.2 | 9.8.0 | 3.7 |
8-
| latest-lts | master-lts | 1.12.2 | 8.10.0 LTS | 3.7 |
7+
| latest | master | 1.12.2 | 11.9.0 | 3.9 |
8+
| latest-lts | master-lts | 1.12.2 | 10.15.1 LTS | 3.9 |
99

1010
## Building from source
1111
To build from source you need to clone the git repo and run docker build:
1212
```
13-
$ git clone https://github.com/Finiz/nginx-node-docker.git
13+
$ git clone https://github.com/MOXGA-OSS/nginx-node-docker.git
1414
```
1515

1616
followed by

app/src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright 2018 Finiz Open Source Software
1+
/* Copyright 2019 Finiz Open Source Software
22
33
Licensed under the Apache License, Version 2.0 (the "License");
44
you may not use this file except in compliance with the License.

docker-compose-example/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2018 Finiz Open Source Software
1+
# Copyright 2019 Finiz Open Source Software
22

33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

nginx/default.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2018 Finiz Open Source Software
1+
# Copyright 2019 Finiz Open Source Software
22

33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

start.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
# Copyright 2018 Finiz Open Source Software
3+
# Copyright 2019 Finiz Open Source Software
44

55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.

supervisord-dev.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; Copyright 2018 Finiz Open Source Software
1+
; Copyright 2019 Finiz Open Source Software
22

33
; Licensed under the Apache License, Version 2.0 (the "License");
44
; you may not use this file except in compliance with the License.

supervisord.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; Copyright 2018 Finiz Open Source Software
1+
; Copyright 2019 Finiz Open Source Software
22

33
; Licensed under the Apache License, Version 2.0 (the "License");
44
; you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)