-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
39 lines (30 loc) · 955 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
38
39
#!/bin/bash
FROM balenalib/rpi-raspbian:stretch
RUN apt-get update
RUN apt-get 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
# uninstall wget
RUN sudo apt-get remove wget
ENV SILEX_VERSION 0.3
# 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 . .
# compile typescript code
RUN sudo npm run compile
EXPOSE 8080
CMD [ "npm", "start" ]