Install Dockerfile and create work builds

I am trying to install bower install on node: 4.1.2 a docker container from the docker file.

Part of my docker file is as follows:

#Install bower to command line
RUN npm install -g bower

# Define the host folder that will contain the code
WORKDIR /application

# Copy src to application host folder**
ADD . /application

# RUN move to /application/public/webapp where there is a bower.json file and install it**
RUN cd public/webapp && bower install --allow-root --config.interactive=false

ENTRYPOINT ["npm"]
CMD ["start"]

I build and up .

This docker file does not create the bower_components folder, despite the display:

Step 9 : RUN cd public/webapp && bower install --allow-root --config.interactive=false
 ---> Running in 937ad6c21887
/application/public/admintool
bower angular#1.4.7         not-cached git://github.com/angular/bower-angular.git#1.4.7
bower angular#1.4.7            resolve git://github.com/angular/bower-angular.git#1.4.7
bower angular#1.4.7           download https://github.com/angular/bower-angular/archive/v1.4.7.tar.gz
bower angular#1.4.7            extract archive.tar.gz
bower angular#1.4.7           resolved git://github.com/angular/bower-angular.git#1.4.7
bower angular#1.4.7            install angular#1.4.7

angular#1.4.7 bower_components/angular

If I go into the container, bower is recognized as a command (it is installed). Running bower install from / application / public / webapp works if Im inside the container. It does nothing from the docker file. Neither does he complain.

Does anyone know why?

+4
1

, docker-compose.yml -v docker?

, , ​​, , -, bower_components . , , , bower_components , , , , .

, , , bower_components . bower, .

0

Source: https://habr.com/ru/post/1613347/


All Articles