From e73f033ca7d582acb69ac30c337c13ffe21848ab Mon Sep 17 00:00:00 2001 From: Arie Kurniawan Date: Fri, 28 Feb 2020 16:23:31 +0700 Subject: [PATCH] Update nodejs and Fixing issue #1931 (#1937) --- Dockerfile.nginx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Dockerfile.nginx b/Dockerfile.nginx index dfe6aee6cc..cd2243ebd2 100644 --- a/Dockerfile.nginx +++ b/Dockerfile.nginx @@ -23,16 +23,22 @@ RUN pip3 wheel --wheel-dir=/tmp/wheels -r ./requirements.txt FROM build AS collectstatic USER root +ENV \ + # This will point yarn to whatever version of node you decide to use + # due to the use of nodejs instead of node name in some distros + node="nodejs" RUN \ apt-get -y update && \ apt-get -y install apt-transport-https ca-certificates && \ curl -sSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \ - echo "deb https://deb.nodesource.com/node_11.x stretch main" | tee /etc/apt/sources.list.d/nodesource.list && \ + curl -sL https://deb.nodesource.com/setup_12.x | bash - && \ curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \ - echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \ + echo "deb https://nightly.yarnpkg.com/debian/ nightly main" | tee /etc/apt/sources.list.d/yarn.list && \ apt-get -y update && \ apt-get -y install nodejs && \ + echo "$(node --version)" && \ apt-get -y install --no-install-recommends yarn && \ + echo "$(yarn --version)" && \ apt-get clean && \ rm -rf /var/lib/apt/lists && \ true