Add log documentation

we didn't end up mounting logs; docker desktop is a better experience
This commit is contained in:
John Plaisted 2020-08-12 11:27:47 -07:00 committed by GitHub
parent 03e3d49445
commit ae69e65431
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,9 +7,7 @@ Normally, you'd rebuild your images from scratch with `docker-compose build` (or
this takes way too long for development. It has to copy the entire repo to each image and rebuild it there. this takes way too long for development. It has to copy the entire repo to each image and rebuild it there.
The `docker-compose.dev.yml` file bypasses this problem by mounting binaries, startup scripts, and other data to The `docker-compose.dev.yml` file bypasses this problem by mounting binaries, startup scripts, and other data to
special, slimmed down images (of which the Dockerfile is usually defined in `<service>/debug/Dockerfile`). Mounts work special, slimmed down images (of which the Dockerfile is usually defined in `<service>/debug/Dockerfile`).
both ways, so they should also try to mount log directories on the container, so that they are easy to read on your
local machine without needing to inspect the running container (especially if the app crashes and the container stops!).
We highly recommend you just invoke the `docker/dev.sh` script we've included. It is pretty small if you want to read it We highly recommend you just invoke the `docker/dev.sh` script we've included. It is pretty small if you want to read it
to see what it does, but it ends up using our `docker-compose.dev.yml` file. to see what it does, but it ends up using our `docker-compose.dev.yml` file.
@ -43,8 +41,13 @@ JAVA_TOOL_OPTIONS -agentlib:jdwp=transport=dt_socket,address=5005,server=y,suspe
- ../gms/war/build/libs/:/datahub/datahub-gms/bin - ../gms/war/build/libs/:/datahub/datahub-gms/bin
``` ```
## Tips for People New To Docker ## Tips for People New To Docker
## Accessing Logs
It is highly recommended you use [Docker Desktop's dashboard](https://www.docker.com/products/docker-desktop) to access service logs. If you double click an image it will pull up the logs for you.
### Conflicting containers ### Conflicting containers
If you ran `docker/quickstart.sh` before, your machine may already have a container for DataHub. If you want to run If you ran `docker/quickstart.sh` before, your machine may already have a container for DataHub. If you want to run