Commit 0f401e68 authored by Valérian STG_CAZANAVE's avatar Valérian STG_CAZANAVE
Browse files

Add some modifications to the Dockerfile

The build time has been reduced,
and the Dockerfile now respects the best practices.
parent b17e63ef
FROM node:8-stretch
RUN apt-get -q update && apt-get -y -q install \
openjdk-8-jre-headless \
chromium \
libgconf-2-4 \
curl \
openjdk-8-jre-headless \
xvfb \
chromium \
&& npm set -g progress=false
&& npm set -g progress=false \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir -p /usr/src/app/hublot
WORKDIR /usr/src/app/hublot
COPY . /usr/src/app/hublot
RUN npm install
COPY package.json .
RUN npm install
RUN npm run setup
RUN chmod +x start.sh
COPY xvfb-chromium /usr/bin/xvfb-chromium
RUN ln -s /usr/bin/xvfb-chromium /usr/bin/google-chrome && \
ln -s /usr/bin/xvfb-chromium /usr/bin/chromium-browser
ADD docker-chromium-xvfb/xvfb-chromium /usr/bin/xvfb-chromium
RUN ln -s /usr/bin/xvfb-chromium /usr/bin/google-chrome
RUN ln -s /usr/bin/xvfb-chromium /usr/bin/chromium-browser
COPY . /usr/src/app/hublot
RUN chmod +x start.sh
CMD ./start.sh
......@@ -9,7 +9,7 @@
"test": "xo && jest",
"test:watch": "jest --watch",
"ci": "yarn && xo && jest --runInBand",
"setup": "yarn run selenium-standalone install && webdriver-manager update --versions.chrome=2.29 --gecko=false",
"setup": "yarn run selenium-standalone install && webdriver-manager update --versions.chrome=2.31 --gecko=false",
"webdriver-start": "./bin/webdriver-start",
"webdriver-stop": "./bin/webdriver-stop"
},
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment