forked from open-source-labs/Spearmint
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
32 lines (29 loc) · 949 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
# FROM node:14
FROM node:16.13
RUN apt-get update && apt-get install \
git libx11-xcb1 libxcb-dri3-0 libxtst6 libnss3 libatk-bridge2.0-0 libgtk-3-0 libxss1 libasound2 \
-yq --no-install-suggests --no-install-recommends \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
RUN useradd -d /spearmint spearmint
USER spearmint
WORKDIR /spearmint
# WORKDIR sets the working directory for subsequent commands
COPY . .
COPY package.json .
# RUN npm run install-once
# RUN npm install
RUN npm install -g npm@latest
RUN npm install --save --legacy-peer-deps
RUN npx electron-rebuild
# EXPOSE 3000
EXPOSE 3001
# Electron needs root for sandboxing
# see https://github.com/electron/electron/issues/17972
USER root
RUN chown root /spearmint/node_modules/electron/dist/chrome-sandbox
RUN chmod 4755 /spearmint/node_modules/electron/dist/chrome-sandbox
USER spearmint
# ADD start.sh /
# RUN chmod +x /start.sh
# CMD ["/start.sh"]
CMD ["npm","start"]