-
Notifications
You must be signed in to change notification settings - Fork 21
/
Dockerfile
33 lines (26 loc) · 905 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
FROM node:16
# example of use:
# docker build -t silex-image .
# docker run -p 6805:6805 -t --rm --name silex -e GITHUB_CLIENT_ID=false -e FS_ROOT=/ silex-image
# env vars can be overriden using the `-e` option in docker run, some env vars are:
# ENV DROPBOX_APP_ID
EXPOSE 6805
COPY . /cloud-explorer
WORKDIR /cloud-explorer
#RUN apt-get update
# Not needed apparently
# Install yarn
# RUN npm install -g yarn
# With yarn
# This is a workaround because npm install takes a long time
# This doesn't work because silex-website-builder has a postinstall script containing an npm command
# RUN yarn install --ignore-engines
# RUN yarn build
# CMD ["yarn", "start"]
# With npm
# Running install with --unsafe-perm option becaus when running as root, npm won't run any scripts.
RUN npm install --unsafe-perm
# Already in postinstall:
# RUN npm run build
# RUN npm run build:prod
CMD ["npm", "start"]