From 3e2f91c1db5461b04415d2a5a2a7b8d7a5951b04 Mon Sep 17 00:00:00 2001 From: maxnus Date: Sun, 3 Feb 2019 10:22:23 +0700 Subject: [PATCH 1/4] Updated node to latest version --- Dockerfile | 4 ++-- Dockerfile-LTS | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2ba7ae5..d934e22 100644 --- a/Dockerfile +++ b/Dockerfile @@ -41,8 +41,8 @@ RUN apk add nginx RUN rm -rf /etc/nginx/conf.d/default.conf ADD nginx/default.conf /etc/nginx/conf.d/default.conf -# Build Node.js 9.x -ENV NODE_VERSION 9.8.0 +# Build Node.js 11.x +ENV NODE_VERSION 11.9.0 RUN addgroup -g 1000 node \ && adduser -u 1000 -G node -s /bin/sh -D node \ diff --git a/Dockerfile-LTS b/Dockerfile-LTS index 06672fa..1bf482f 100644 --- a/Dockerfile-LTS +++ b/Dockerfile-LTS @@ -41,7 +41,7 @@ RUN apk add nginx RUN rm -rf /etc/nginx/conf.d/default.conf ADD nginx/default.conf /etc/nginx/conf.d/default.conf -# Install Node.js 8.10.0 LTS and NPM +# Install Node.js 10.15.1 LTS and NPM RUN apk add --update-cache nodejs nodejs-npm --repository http://dl-3.alpinelinux.org/alpine/edge/main/ # Install Yarn Package Manager 1.5.1 From 76cc67411570d4a17c3bd452af5b761aee59ad2a Mon Sep 17 00:00:00 2001 From: maxnus Date: Sun, 3 Feb 2019 10:50:42 +0700 Subject: [PATCH 2/4] Updated to latest --- Dockerfile | 42 +++++++++++++++------------ Dockerfile-LTS | 78 ++++++++++++++++++++++++++++++++++++++++++++++---- README.md | 6 ++-- 3 files changed, 98 insertions(+), 28 deletions(-) diff --git a/Dockerfile b/Dockerfile index d934e22..0ad1c22 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2018 Finiz Open Source Software +# Copyright 2019 Finiz Open Source Software # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -58,7 +58,7 @@ RUN addgroup -g 1000 node \ linux-headers \ make \ python \ - # gpg keys listed at https://github.com/nodejs/node#release-team + # gpg keys listed at https://github.com/nodejs/node#release-keys && for key in \ 94AE36675C464D64BAFA68DD7434390BDBE9B9C5 \ FD3A5288F042B6850C66B31F09FE44734EB7990E \ @@ -66,15 +66,18 @@ RUN addgroup -g 1000 node \ DD8F2338BAE7501E3DD5AC78C273792F7D83545D \ C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8 \ B9AE9905FFD7803F25714661B63B535A4C206CA9 \ - 56730D5401028683275BD23C23EFEFE93C4CFFFE \ 77984A986EBC2AA786BC0F66B01FBB92821C587A \ + 8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600 \ + 4ED778F539E3634C779C87C6D7062848A1AB005C \ + A48C2BEE680E841632CD4E44F07496B3EB3C1762 \ + B9E2F5981AA6E0CD28160D9FF13993A75599653C \ ; do \ - gpg --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" || \ - gpg --keyserver hkp://ipv4.pool.sks-keyservers.net --recv-keys "$key" || \ - gpg --keyserver hkp://pgp.mit.edu:80 --recv-keys "$key" ; \ + gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" || \ + gpg --batch --keyserver hkp://ipv4.pool.sks-keyservers.net --recv-keys "$key" || \ + gpg --batch --keyserver hkp://pgp.mit.edu:80 --recv-keys "$key" ; \ done \ - && curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION.tar.xz" \ - && curl -SLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \ + && curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION.tar.xz" \ + && curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \ && gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \ && grep " node-v$NODE_VERSION.tar.xz\$" SHASUMS256.txt | sha256sum -c - \ && tar -xf "node-v$NODE_VERSION.tar.xz" \ @@ -87,24 +90,25 @@ RUN addgroup -g 1000 node \ && rm -Rf "node-v$NODE_VERSION" \ && rm "node-v$NODE_VERSION.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt -# Build Yarn Package Manager 1.5.x -ENV YARN_VERSION 1.5.1 +# Build Yarn Package Manager 1.13.x + +ENV YARN_VERSION 1.13.0 RUN apk add --no-cache --virtual .build-deps-yarn curl gnupg tar \ && for key in \ 6A010C5166006599AA17F08146C2130DFD2497F5 \ ; do \ - gpg --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" || \ - gpg --keyserver hkp://ipv4.pool.sks-keyservers.net --recv-keys "$key" || \ - gpg --keyserver hkp://pgp.mit.edu:80 --recv-keys "$key" ; \ + gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" || \ + gpg --batch --keyserver hkp://ipv4.pool.sks-keyservers.net --recv-keys "$key" || \ + gpg --batch --keyserver hkp://pgp.mit.edu:80 --recv-keys "$key" ; \ done \ - && curl -fSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \ - && curl -fSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz.asc" \ + && curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \ + && curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz.asc" \ && gpg --batch --verify yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \ - && mkdir -p /opt/yarn \ - && tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/yarn --strip-components=1 \ - && ln -s /opt/yarn/bin/yarn /usr/local/bin/yarn \ - && ln -s /opt/yarn/bin/yarn /usr/local/bin/yarnpkg \ + && mkdir -p /opt \ + && tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/ \ + && ln -s /opt/yarn-v$YARN_VERSION/bin/yarn /usr/local/bin/yarn \ + && ln -s /opt/yarn-v$YARN_VERSION/bin/yarnpkg /usr/local/bin/yarnpkg \ && rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \ && apk del .build-deps-yarn diff --git a/Dockerfile-LTS b/Dockerfile-LTS index 1bf482f..ac703cb 100644 --- a/Dockerfile-LTS +++ b/Dockerfile-LTS @@ -1,4 +1,4 @@ -# Copyright 2018 Finiz Open Source Software +# Copyright 2019 Finiz Open Source Software # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -41,11 +41,77 @@ RUN apk add nginx RUN rm -rf /etc/nginx/conf.d/default.conf ADD nginx/default.conf /etc/nginx/conf.d/default.conf -# Install Node.js 10.15.1 LTS and NPM -RUN apk add --update-cache nodejs nodejs-npm --repository http://dl-3.alpinelinux.org/alpine/edge/main/ - -# Install Yarn Package Manager 1.5.1 -RUN apk add --update-cache yarn --repository http://dl-3.alpinelinux.org/alpine/edge/community/ +# Build Node.js 10.15.x + +ENV NODE_VERSION 10.15.1 + +RUN addgroup -g 1000 node \ + && adduser -u 1000 -G node -s /bin/sh -D node \ + && apk add --no-cache \ + libstdc++ \ + && apk add --no-cache --virtual .build-deps \ + binutils-gold \ + curl \ + g++ \ + gcc \ + gnupg \ + libgcc \ + linux-headers \ + make \ + python \ + # gpg keys listed at https://github.com/nodejs/node#release-keys + && for key in \ + 94AE36675C464D64BAFA68DD7434390BDBE9B9C5 \ + FD3A5288F042B6850C66B31F09FE44734EB7990E \ + 71DCFD284A79C3B38668286BC97EC7A07EDE3FC1 \ + DD8F2338BAE7501E3DD5AC78C273792F7D83545D \ + C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8 \ + B9AE9905FFD7803F25714661B63B535A4C206CA9 \ + 77984A986EBC2AA786BC0F66B01FBB92821C587A \ + 8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600 \ + 4ED778F539E3634C779C87C6D7062848A1AB005C \ + A48C2BEE680E841632CD4E44F07496B3EB3C1762 \ + B9E2F5981AA6E0CD28160D9FF13993A75599653C \ + ; do \ + gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" || \ + gpg --batch --keyserver hkp://ipv4.pool.sks-keyservers.net --recv-keys "$key" || \ + gpg --batch --keyserver hkp://pgp.mit.edu:80 --recv-keys "$key" ; \ + done \ + && curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION.tar.xz" \ + && curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \ + && gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \ + && grep " node-v$NODE_VERSION.tar.xz\$" SHASUMS256.txt | sha256sum -c - \ + && tar -xf "node-v$NODE_VERSION.tar.xz" \ + && cd "node-v$NODE_VERSION" \ + && ./configure \ + && make -j$(getconf _NPROCESSORS_ONLN) \ + && make install \ + && apk del .build-deps \ + && cd .. \ + && rm -Rf "node-v$NODE_VERSION" \ + && rm "node-v$NODE_VERSION.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt + +# Build Yarn Package Manager 1.13.x + +ENV YARN_VERSION 1.13.0 + +RUN apk add --no-cache --virtual .build-deps-yarn curl gnupg tar \ + && for key in \ + 6A010C5166006599AA17F08146C2130DFD2497F5 \ + ; do \ + gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" || \ + gpg --batch --keyserver hkp://ipv4.pool.sks-keyservers.net --recv-keys "$key" || \ + gpg --batch --keyserver hkp://pgp.mit.edu:80 --recv-keys "$key" ; \ + done \ + && curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \ + && curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz.asc" \ + && gpg --batch --verify yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \ + && mkdir -p /opt \ + && tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/ \ + && ln -s /opt/yarn-v$YARN_VERSION/bin/yarn /usr/local/bin/yarn \ + && ln -s /opt/yarn-v$YARN_VERSION/bin/yarnpkg /usr/local/bin/yarnpkg \ + && rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \ + && apk del .build-deps-yarn # Add Node.js app COPY app /app diff --git a/README.md b/README.md index 0b4e0e2..bc0e1e9 100644 --- a/README.md +++ b/README.md @@ -4,13 +4,13 @@ This is an Alpine based container image running Nginx reversing proxy with Node ### Versioning | Docker Tag | GitHub Release | Nginx Version | Node Version | Alpine Version | |-----|-------|-----|--------|--------| -| latest | master | 1.12.2 | 9.8.0 | 3.7 | -| latest-lts | master-lts | 1.12.2 | 8.10.0 LTS | 3.7 | +| latest | master | 1.12.2 | 11.9.0 | 3.9 | +| latest-lts | master-lts | 1.12.2 | 10.15.1 LTS | 3.9 | ## Building from source To build from source you need to clone the git repo and run docker build: ``` -$ git clone https://github.com/Finiz/nginx-node-docker.git +$ git clone https://github.com/MOXGA-OSS/nginx-node-docker.git ``` followed by From 9654920e790787345266cc747d5e56547fd46662 Mon Sep 17 00:00:00 2001 From: maxnus Date: Sun, 3 Feb 2019 12:01:35 +0700 Subject: [PATCH 3/4] Updated license years --- app/src/index.js | 2 +- docker-compose-example/docker-compose.yml | 2 +- nginx/default.conf | 2 +- start.sh | 2 +- supervisord-dev.conf | 2 +- supervisord.conf | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/src/index.js b/app/src/index.js index ef53f1b..99d1bf0 100644 --- a/app/src/index.js +++ b/app/src/index.js @@ -1,4 +1,4 @@ -/* Copyright 2018 Finiz Open Source Software +/* Copyright 2019 Finiz Open Source Software Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/docker-compose-example/docker-compose.yml b/docker-compose-example/docker-compose.yml index 3f4a9d9..bef9ed5 100644 --- a/docker-compose-example/docker-compose.yml +++ b/docker-compose-example/docker-compose.yml @@ -1,4 +1,4 @@ -# Copyright 2018 Finiz Open Source Software +# Copyright 2019 Finiz Open Source Software # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/nginx/default.conf b/nginx/default.conf index c7ab019..2666f48 100644 --- a/nginx/default.conf +++ b/nginx/default.conf @@ -1,4 +1,4 @@ -# Copyright 2018 Finiz Open Source Software +# Copyright 2019 Finiz Open Source Software # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/start.sh b/start.sh index 1926a12..b9b932e 100644 --- a/start.sh +++ b/start.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2018 Finiz Open Source Software +# Copyright 2019 Finiz Open Source Software # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/supervisord-dev.conf b/supervisord-dev.conf index 266476d..d6623d4 100644 --- a/supervisord-dev.conf +++ b/supervisord-dev.conf @@ -1,4 +1,4 @@ -; Copyright 2018 Finiz Open Source Software +; Copyright 2019 Finiz Open Source Software ; Licensed under the Apache License, Version 2.0 (the "License"); ; you may not use this file except in compliance with the License. diff --git a/supervisord.conf b/supervisord.conf index c3ebc9f..959dc69 100644 --- a/supervisord.conf +++ b/supervisord.conf @@ -1,4 +1,4 @@ -; Copyright 2018 Finiz Open Source Software +; Copyright 2019 Finiz Open Source Software ; Licensed under the Apache License, Version 2.0 (the "License"); ; you may not use this file except in compliance with the License. From 06242dfb0f8cb534d80274dcb30a34dbb80b7513 Mon Sep 17 00:00:00 2001 From: Sirinat Paphatsirinatthi Date: Sun, 3 Feb 2019 12:19:12 +0700 Subject: [PATCH 4/4] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bc0e1e9..c97b428 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ ## Introduction -This is an Alpine based container image running Nginx reversing proxy with Node v9.x (Yarn Support) +This is an Alpine based container image running Nginx reversing proxy with Node v11.x (Yarn Support) ### Versioning | Docker Tag | GitHub Release | Nginx Version | Node Version | Alpine Version |