deeplx / Dockerfile
kingtest's picture
Update Dockerfile
4c07c1c verified
raw
history blame contribute delete
434 Bytes
# 指定基础镜像为node的alpine版本
FROM node:14-alpine
# 安装git,克隆仓库,然后移除git以减小镜像体积
RUN apk add --no-cache git && \
git clone https://github.com/xiaozhou26/deeplx-pro.git /app && \
apk del git
# 设置工作目录
WORKDIR /app
# 安装app依赖包
RUN npm install --production
# 暴露容器端口
EXPOSE 9000
# 定义容器启动时执行的命令
CMD ["node", "server.js"]