设置了Docker构建方式
This commit is contained in:
10
Dockerfile
Normal file
10
Dockerfile
Normal file
@ -0,0 +1,10 @@
|
||||
FROM node:20.10
|
||||
LABEL maintainer="ZhuangYumin <zhuangyumin@sjtu.edu.cn>"
|
||||
COPY . /bookstore/
|
||||
RUN apt-get update && apt-get install -y g++ && apt-get install -y cmake
|
||||
WORKDIR /bookstore/
|
||||
RUN mkdir data
|
||||
RUN mkdir build && cd build && cmake -B . -S .. && cmake --build . && cd ../frontend/Web && npm install
|
||||
WORKDIR /bookstore/frontend/Web
|
||||
EXPOSE 3000
|
||||
CMD ["node","index.js","/bookstore/data/"]
|
Reference in New Issue
Block a user