-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
26 lines (18 loc) · 1.01 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
FROM heroku/heroku:16
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 16.14.2
# 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
# Install node
RUN curl -s https://s3.amazonaws.com/heroku-nodebin/node/release/linux-x64/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 - \
&& 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