Docker whether to modify the file requires a reboot
Docker modify the file need to restart, in doing the project, often modify the file, for the command is not more understanding, with the attitude of trial, here on how to use, improve work efficiency.
Need to modify the code in the first phase of the project, each time before the "try" the way to get to do not start, now summarize what the situation needs to start what
1, first again familiar with the role of each command
- Docker-compose up-d-will start and run all containers in the background
- Docker-compose stop-stops a container that is already running, but does not delete it, you can restart it by Docker-compose start
- Docker exec-it XX bash-convenient for the user to let the container execute the specified command outside the container
- Docker logs xx-View the log of XX container
2, start
Modify foreground code
Include code written using react, reflux, and modify it to run the following command only
$ NPM Run Webpack
#重新打包代码, set the exception for automatic packaging
Modify Background code
including Web-api, PAPER-API and other containers in the code, you need to restart the corresponding container
For example, modify the code in WEB-API and switch to run under Assembly
$ service Docker start
#最开始执行一次
$ docker-compose up-d
#启动所有容器, perform one
$ docker-compose Restart Web-api
#重新启动web-api to make the modification code effective
Thank you for reading, I hope to help you, thank you for your support for this site!