From c7b2d9db9d9c8d8cd7146dda5c84cfa2c0236ca9 Mon Sep 17 00:00:00 2001 From: Stefano Sala Date: Mon, 14 Aug 2017 11:02:06 +0200 Subject: [PATCH] Update to 8.3.0 and small optimizations --- Dockerfile | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/Dockerfile b/Dockerfile index d939c90..de20631 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,29 +2,27 @@ FROM heroku/cedar:14 MAINTAINER Stefano Sala -# The following setup is inspired by the Heroku Node-js dockerfile with some -# extras and a different node version. +WORKDIR /app/user + +# The following setup is inspired by the Heroku Node-js dockerfile with some extras and a different node version. # Which version of node? -ENV NODE_ENGINE 7.10.1 +ENV NODE_ENGINE 8.3.0 # Locate our binaries ENV PATH /app/heroku/node/bin/:/app/user/node_modules/.bin:$PATH # Create some needed directories RUN mkdir -p /app/heroku/node /app/.profile.d -WORKDIR /app/user # Install node -RUN curl -s https://s3pository.heroku.com/node/v$NODE_ENGINE/node-v$NODE_ENGINE-linux-x64.tar.gz | tar --strip-components=1 -xz -C /app/heroku/node - -# Export the node path in .profile.d -RUN echo "export PATH=\"/app/heroku/node/bin:/app/user/node_modules/.bin:\$PATH\"" > /app/.profile.d/nodejs.sh +RUN curl -s https://s3pository.heroku.com/node/v$NODE_ENGINE/node-v$NODE_ENGINE-linux-x64.tar.gz | tar --strip-components=1 -xz -C /app/heroku/node \ + && echo "export PATH=\"/app/heroku/node/bin:/app/user/node_modules/.bin:\$PATH\"" > /app/.profile.d/nodejs.sh # Install yarn -RUN curl -sS http://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - -RUN echo "deb http://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list -RUN apt-get update && apt-get install -y yarn +RUN curl -sS http://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ + && echo "deb http://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \ + && apt update && apt install -y yarn && rm -rf /var/lib/apt/lists/* /var/cache/apt/* # Replace shell with bash so we can source files RUN rm /bin/sh && ln -s /bin/bash /bin/sh