FROM zaaksam/chromium:latest
LABEL maintainer="[email protected]"
COPY gauge /usr/local/bin/gauge
COPY plugins/ tmp/plugins/
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
ENV NODE_PATH=/usr/local/share/.config/yarn/global/node_modules
RUN echo "registry = https://registry.npm.taobao.org" > ~/.npmrc \
&& echo "disturl = https://npm.taobao.org/dist" >> ~/.npmrc \
&& echo "puppeteer_download_host = https://npm.taobao.org/mirrors/chromium-browser-snapshots" >> ~/.npmrc \
&& npm config rm proxy \
&& npm config rm https-proxy \
&& yarn config delete proxy \
&& gauge -l debug install js -f tmp/plugins/gauge-js-2.3.1-linux.x86_64.zip \
&& gauge -l debug install html-report -f tmp/plugins/html-report-4.0.5-linux.x86_64.zip \
&& gauge -l debug install screenshot -f tmp/plugins/screenshot-0.0.1-linux.x86_64.zip \
&& rm -rf tmp/plugins \
&& yarn global add [email protected] assert axios lodash moment \
&& yarn cache clean