forked from MSU-NatSci/DomainAccessibilityAudit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
39 lines (29 loc) · 1.31 KB
/
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
FROM debian:sid
# We are using sid instead of stretch to use a recent version of Firefox
WORKDIR /app
# Get Chromium, Firefox and Node
RUN apt-get update && apt-get install -y curl gnupg
RUN curl -sL https://deb.nodesource.com/setup_12.x | bash -
RUN apt-get install -yq \
chromium chromium-driver firefox xvfb xsel unzip nodejs wget
# geckodriver
# see latest at https://github.com/mozilla/geckodriver/releases/
RUN wget -q "https://github.com/mozilla/geckodriver/releases/download/v0.25.0/geckodriver-v0.25.0-linux64.tar.gz" \
-O /tmp/geckodriver.tgz \
&& tar zxf /tmp/geckodriver.tgz -C /usr/bin/ \
&& rm /tmp/geckodriver.tgz
# create symlinks to chromedriver and geckodriver (to the PATH)
RUN ln -s /usr/bin/geckodriver /usr/bin/chromium-browser \
&& chmod 777 /usr/bin/geckodriver \
&& chmod 777 /usr/bin/chromium-browser
# Run node as node with primary group node
RUN groupadd --gid 1000 node \
&& useradd --uid 1000 --gid node --shell /bin/bash --create-home node
RUN chown node:node /app
USER node
COPY --chown=node:node package.json package-lock.json ./
COPY --chown=node:node client/package.json client/package-lock.json ./client/
COPY --chown=node:node backend/package.json backend/package-lock.json backend/babel.config.js ./backend/
ENV HUSKY_SKIP_INSTALL 1
RUN npm install
CMD ["npm", "run", "start"]