Docker Gets Stuck Restarting Issue 1047 Docker/for-mac Github

2020. 1. 28. 07:12카테고리 없음

Docker Gets Stuck Restarting Issue 1047 Docker/for-mac Github

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

  1. Docker Gets Stuck Restarting Issue 1047 Docker/for-mac Github Download
  • Set docker host ip (advertised.host.name) for mac and ubuntu in docker-compose.yml. My main problem is that my docker client VM can't connect to the private.
  • Uninstalling and trying again had different behavior. It still hung for nearly 30 minutes at the same place, but then it continued (notice the 27 minute gap between the first and second entry here).

As other commenters have mentioned, the 'rm' command is destroying your container, not restarting it. But to answer your question you could use something like this: watch -n 0 'docker logs mycontainer' The docker logs command doesn't keep running for a stopped container, but you can achieve a similar effect using the 'watch' command. And since it's not a Docker command, it doesn't care if the container is running or not. If you're on a Mac you might not have watch. It can be installed using pip. The same thing can be achieved with a one-liner bash script but I find watch to be much neater.

We recommend doing all development in Docker containers using Docker Compose configuration to link containers together and link your host machine files into the containers. You may be able to get away with doing some development directly on your host machine, but learning the container development pattern will be necessary as we move the app toward microservice architecture. Getting Started Follow the normal steps. After that:.

Docker Gets Stuck Restarting Issue 1047 Docker/for-mac Github Download

Install. (Use 'Docker for Mac' installer if on Mac. Use 'Docker for Windows' installer if on Windows.). Install (recommended for container management through a nice UI). Install if necessary. If you installed 'Docker for Mac' or 'Docker for Windows', it's already included. Alias Docker Compose Commands Because they can be a lot to type and you'll type them often, we recommend at least two command aliases.

In Mac OSX for example, add these two lines to /.bashprofile: alias dc= 'docker-compose' alias dcrun= 'docker-compose run -rm' Then wherever these instructions say docker-compose, you can type only dc, and wherever these instructions say docker-compose run -rm, you can type only dcrun. Run the Reaction API NOTE: If you also need to run the storefront or just want to simplify this a bit, consider using, which will do all of this and more. Thanks to the Dockerfiles and docker-compose.yml file in the root of the main Reaction project repo, you can start all necessary services in Docker containers by running: docker-compose up -d (If you are asked to run a command to create a network, then do so and retry.) This will start a MongoDB container, enable MongoDB oplog, and start a Reaction API container, with necessary links between them and environment variables for local development.

Gets

The containers will start in the background. Stop the Reaction API Stop all services and delete the containers: docker-compose down Or stop individual services: docker-compose stop mongo docker-compose stop reaction Restart the Reaction API The Reaction API restarts automatically for most file changes, but if you change an environment variable or docker-compose config, or want to restart the whole container for any other reason, you can do: docker-compose restart reaction View Service Logs While development containers are running, you can view the logs for any of the services. One easy way is to open the Kitematic app and click on the service. You can also follow the logs in a terminal with: docker-compose logs -f Reaction API logs: docker-compose logs -f reaction MongoDB logs: docker-compose logs -f mongo Make Code Changes The Docker Compose config links all files except nodemodules into the app containers. Therefore you can just modify code as you normally would, and the development app server running inside the container should detect your changes and restart. If for some reason it gets 'stuck' and isn't seeing your changes, just stop and then restart the stuck service using the docker-compose commands or the Kitematic UI. Useful Commands Bring all services up, but force them all to rebuild their image first: docker-compose up -d -build Delete all volumes when bringing the services down: docker-compose down -v Delete all images when bringing the services down: docker-compose down -rmi local You can put these last two together for a fresh slate: docker-compose down -v -rmi local To delete unused containers or images, which is useful to do now and then, run the 'prune' commands.

But beware that any remote images deleted will need to be re-downloaded, and you'll also lose any local images you may have created for other purposes. Docker container prune docker image prune If you have big problems, there is a 'Reset' option in the Docker for Mac or Docker for Windows app preferences UI, or you can do docker system prune. Troubleshooting Refer to.

Docker Gets Stuck Restarting Issue 1047 Docker/for-mac Github