Docker modify the file need to reboot (command detailed) _docker

Source: Internet
Author: User

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

    1. Docker-compose up-d-will start and run all containers in the background
    2. Docker-compose stop-stops a container that is already running, but does not delete it, you can restart it by Docker-compose start
    3. Docker exec-it XX bash-convenient for the user to let the container execute the specified command outside the container
    4. 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!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.