-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
31 lines (23 loc) · 868 Bytes
/
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
27
28
29
30
31
# Getting from this base so we can override some of the build steps
FROM resin/raspberrypi2-node:0.12.4
# Setup base app dir
ENV APP_BASE /usr/src/app
RUN mkdir -p $APP_BASE
WORKDIR $APP_BASE
# Install image tools
RUN apt-get update && apt-get install -y \
dcraw \
gphoto2 \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
# We need to install pm2 globally so it can be found. Squash the nasty output.
# RUN npm install pm2 -g --unsafe-perm --loglevel verbose
# Run npm install here to cache this later for future builds
COPY package.json $APP_BASE/
# Run npm install and squash the nasty output.
RUN DEBIAN_FRONTEND=noninteractive JOBS=MAX npm install --unsafe-perm
# Use Systemd in container: https://resin.io/blog/brand-new-base-images/
ENV INITSYSTEM on
# Copy over app source
COPY . $APP_BASE
# Start up the app
CMD [ "node", "$APP_BASE/server.js" ]