This repository has been archived by the owner on Jun 7, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathDockerfile.template
65 lines (53 loc) · 1.53 KB
/
Dockerfile.template
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
FROM resin/%%RESIN_MACHINE_NAME%%-node:6
# FROM resin/raspberrypi3-node:6
# Install other apt deps
RUN apt-get update && apt-get install -y \
apt-utils \
clang \
xserver-xorg-core \
xserver-xorg-input-all \
xserver-xorg-video-fbdev \
xorg \
libdbus-1-dev \
libgtk2.0-dev \
libnotify-dev \
libgnome-keyring-dev \
libgconf2-dev \
libasound2-dev \
libcap-dev \
libcups2-dev \
libxtst-dev \
libxss1 \
libnss3-dev \
fluxbox \
libsmbclient \
libssh-4 \
fbset \
libexpat-dev && rm -rf /var/lib/apt/lists/*
# Set Xorg and FLUXBOX preferences
RUN mkdir ~/.fluxbox
RUN echo "xset s off" > ~/.fluxbox/startup && echo "xserver-command=X -s 0 dpms" >> ~/.fluxbox/startup
RUN echo "#!/bin/bash" > /etc/X11/xinit/xserverrc \
&& echo "" >> /etc/X11/xinit/xserverrc \
&& echo 'exec /usr/bin/X -s 0 dpms -nocursor -nolisten tcp "$@"' >> /etc/X11/xinit/xserverrc
RUN npm install --unsafe-perm -g yarn
# Move to app dir
WORKDIR /usr/src/app
COPY ./package.json ./
COPY ./yarn.lock ./
# Install yarn modules for the application
RUN yarn install --unsafe-perm
COPY ./.eslintrc.js ./
COPY ./.electron-vue ./.electron-vue
COPY ./src ./src
COPY ./static ./static
RUN yarn run pack
RUN rm -rf src/ static/ .electron-vue/ eslintrc.js
# Install yarn modules for the application
RUN yarn install --unsafe-perm --production --prefer-offline \
&& yarn cache clean && node_modules/.bin/electron-rebuild
COPY ./docker/start.sh ./start.sh
## uncomment if you want systemd
ENV INITSYSTEM on
# Start app
CMD ["bash", "/usr/src/app/start.sh"]