4 ms·
I have almost no experience with Docker so this may be a beginners question. How would one get to the output of a Docker image such as logging? On a (virtual) O
by A_No_Name_Mouse 8y ago
I have almost no experience with Docker so this may be a beginners question. How would one get to the output of a Docker image such as logging? On a (virtual) O.S. I can log on, but would I have a similar solution on a Docker image? Or would I have to redirect all logging to a central server or database?
- gmuslera 8y agoYou can log inside the container as normal (if it is a long running/persistent one) and exec a shell on it to work with the logs, or you can log to a mounted volume (to local drive, another container used for storage, a remote drive, etc), or send the logs to a central log server or an elasticsearch database to have a search engine/dashboard for your logs. There are more options, but the best depends on your use case.
- sidcool 8y agoYou can think of a docker image as a static template of instructions. A container is a running instance of the docker image. This running instance is not very different from a virtual machine (I am abstracting many details here). You can ssh into the running containers just like a normal virtual machine.