dockerfile
/www/wwwroot # cat Dockerfile
FROM node:12.18.0-alpine3.11
ARG NPM_RUN_ARG=build
ARG NPM_RUN_ARG_TWO=build-storybook
RUN apk add nginx tzdata
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
ADD . /www/wwwroot/
WORKDIR /www/wwwroot/
#RUN yarn install
ADD https://ctdles.oss-cn-beijing.aliyuncs.com/ui.tar.gz /www/wwwroot
RUN tar zxf ui.tar.gz
RUN npm run $NPM_RUN_ARG
RUN npm run $NPM_RUN_ARG_TWO
COPY ./deploy/nginx.conf ./deploy/mime.types /etc/nginx/
CMD ["/usr/sbin/nginx", "-g", "daemon off;"]
Nginx配置文件修改
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;
worker_rlimit_nofile 65535;
include /usr/share/nginx/modules/*.conf;
events {
use epoll;
worker_connections 51200