For more info, see the Logging Documentation. You can view logs for a given Docker container with docker logs, add the -follow flag to stream the logs. There's also Deunhealth, which is super light-weight, and doesn't require network access.ĭocker run -d \ -name autoheal \ -restart = always \ -e AUTOHEAL_CONTAINER_LABEL = all \ -v /var/run/docker.sock:/var/run/docker.sock \ willfarrell/autoheal Copy (This is a stand in for Docker's -exit-on-unhealthy that was proposed, but not merged). This image watches for unhealthy containers, and automatically triggers a restart. To restart unhealthy containers automatically, check out Autoheal. You can disable healthchecks altogether by adding the -no-healthcheck flag to your Docker run command. You can also manually request the current application status by running docker exec -it yarn health-check. You can check the current container health with: docker inspect -format "", and a summary of health status will show up under docker ps. By default, the health script is called every 5 minutes, but this can be modified with the -health-interval option. Healthchecks are configured to periodically check that Dashy is up and running correctly on the specified port. You can also enter the container, with docker exec -it /bin/ash, and navigate around it with normal Linux commands.ĭashy has several commands that can be used for various tasks, you can find a list of these either in the Developing Docs, or by looking at the package.json. For example docker exec -it 26c156c467b4 yarn build. This can be done by preceding each command with docker exec -it, where container ID can be found by running docker ps. If you're running an app in Docker, then commands will need to be passed to the container to be executed.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |