Files
Taisite-Platform/Dockerfile.frontend
2019-08-16 16:25:36 +08:00

17 lines
478 B
Docker

FROM node:alpine
USER root
ENV WORKING_DIR /app/AutoTest-Platform
# Provides cached layer for node_modules
COPY frontend ${WORKING_DIR}/frontend
RUN sh -c "echo 'Asia/Shanghai' > /etc/timezone" \
&& cd ${WORKING_DIR}/frontend \
&& npm install -g cnpm --registry=https://registry.npm.taobao.org \
&& cnpm install phantomjs-prebuilt@2.1.16 --ignore-scripts \
&& cnpm rebuild node-sass \
&& cnpm install
ENTRYPOINT cd ${WORKING_DIR}/frontend; npm run build