使用React基于WebSocket的聊天程序,普通文本消息,文件,图片,视频消息,语音消息,视频通话,屏幕共享等。
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

23 lines
652 B

FROM node:16-alpine3.15 as builder
WORKDIR /home/go-chat-web
COPY ./ /home/go-chat-web
RUN npm config set registry http://registry.npm.taobao.org
RUN npm install
RUN npm run build && rm -rf ./node_modules
WORKDIR /home/go-chat-web
COPY --from=builder /home/go-chat-web/build /home/go-chat-web
RUN npm config set registry http://registry.npm.taobao.org
RUN npm install -g serve
CMD ["serve", "-s"]
# 如果本地编译好,直接复制build文件后运行
# FROM node:16-alpine3.15
# WORKDIR /home/go-chat-web
# COPY ./ /home/go-chat-web
# RUN npm config set registry http://registry.npm.taobao.org
# RUN npm install -g serve
# CMD ["serve", "-s"]