Skip to content

Commit

Permalink
Update to 8.3.0 and small optimizations
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanosala committed Aug 14, 2017
1 parent 6a12ed4 commit c7b2d9d
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,27 @@ FROM heroku/cedar:14

MAINTAINER Stefano Sala <stefano@conversio.com>

# 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

0 comments on commit c7b2d9d

Please sign in to comment.