-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
37 lines (29 loc) · 980 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
32
33
34
35
36
37
#!/bin/bash
FROM balenalib/rpi-raspbian:stretch
RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get dist-upgrade -y
RUN apt-get install wget
RUN wget https://nodejs.org/dist/v11.10.1/node-v11.10.1-linux-armv7l.tar.gz
RUN tar -xvf node-v11.10.1-linux-armv7l.tar.gz
RUN cd node-v11.10.1-linux-armv7l/ && sudo cp -R * /usr/local/ #attention copies also readme and other not required files
RUN cd ..
RUN sudo npm -v
RUN sudo node -v
# Create app directory
WORKDIR /usr/src/app
# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
COPY package*.json ./
RUN sudo npm config set registry https://registry.npmjs.org/
RUN sudo npm i
# If you are building your code for production
# RUN npm install --only=production
# Bundle app source
COPY . .
# build next.js
RUN sudo npm run build
# expose multiple ports
EXPOSE 3001 999
CMD [ "npm", "run", "start-server" ]