Reputation: 13837
--myproject
---app
----bower.json
----index.html
---package.json
My project folder structure is like that. What I want is I want to run bower install
command in docker file before npm install
. Following is my Dockerfile
. Got stuck how to go sub folder and run bower install
. Thanks.
### STAGE 1: Build ###
FROM node:latest as builder
LABEL auther="PPShein"
COPY package.json package.json
RUN npm install
COPY . .
RUN gulp default
Upvotes: 2
Views: 2144
Reputation: 12129
Use
RUN cd app && bower install
Or
WORKDIR app
bower install
this changes the pwd for all following commands, which you may not want.
PS. Careful with COPY . .
, it may overwrite what you just built.
Upvotes: 5