--myproject
---app
----bower.json
----index.html
---package.json
我的项目文件夹结构就是这样的。我想要的是在npm install
之前运行docker文件中的bower install
命令。下面是我的Dockerfile
。转到子文件夹并运行bower install
时遇到了问题。谢谢。
### STAGE 1: Build ###
FROM node:latest as builder
LABEL auther="PPShein"
COPY package.json package.json
RUN npm install
COPY . .
RUN gulp default
发布于 2018-11-29 00:56:16
使用
RUN cd app && bower install
或
WORKDIR app
bower install
这会更改以下所有命令的pwd,这可能不是您想要的。
PS。小心使用COPY . .
,它可能会覆盖您刚刚构建的内容。
https://stackoverflow.com/questions/53522735
复制相似问题