question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Where to find docker logs?

See original GitHub issue

Hi,

How I can retrieve the logs one would usually obtain using docker logs CONTAINERNAME, when using batch-shipyard? I am not sure whether this is the right place to ask this question, but I cannot seem to find the answer anywhere in the documentation.

Thanks!

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
sebastkocommented, Jul 11, 2018

Thank you! I have used a variation of option 2 - I have mounted a shared data volume and then just modified my tasks’ “command” properties to the following:

command: /bin/bash -c "mkdir -p $AZ_BATCH_NODE_SHARED_DIR/logs_volume/$AZ_BATCH_JOB_ID/$AZ_BATCH_TASK_ID &&   [original command line content]
> >(tee $AZ_BATCH_NODE_SHARED_DIR/logs_volume/$AZ_BATCH_JOB_ID/$$AZ_BATCH_TASK_ID/stdout.log) 2> >(tee $AZ_BATCH_NODE_SHARED_DIR/logs_volume/$AZ_BATCH_JOB_ID/$$AZ_BATCH_TASK_ID/stderr.log >&2)"

Results in a bit long “command” property, but seems to work as expected!

0reactions
alfparkcommented, Jul 11, 2018

Files generated by tasks only exist while the compute node exists, unless you use a persistence mechanism. There are a few you can use:

  1. output_data on the task
  2. Mounting a volume defined in the global configuration shared_data_volumes. You can use azurefile or azureblob as the driver. Then in your jobs configuration, ensure you have cross-referenced the mount. As the last step of your task, you can copy your files to the appropriate bound location (you can utilize various Azure Batch Environment Variables to help disambiguate your destination path/location.
Read more comments on GitHub >

github_iconTop Results From Across the Web

Docker Logs Location: Where Are Container Logs Stored
You find these JSON log files in the /var/lib/docker/containers/ directory on a Linux Docker host. The <container_id> here is the id of the ......
Read more >
View container logs - Docker Documentation
The docker logs command shows information logged by a running container. The docker service logs command shows information logged by all containers ...
Read more >
Where is the Docker daemon log? - Stack Overflow
Inside the Console App just choose system.log and type Docker into the search bar. That´s it. Now you should see all Docker related...
Read more >
How to find Docker logs? - Linux Hint
When you run any container in detached mode, you can not see any logs in the console. In this case, you can use...
Read more >
How to Check Docker Logs? - Geekflare
Docker Logs Location ... Docker, by default, captures the standard output (and standard error) of all your containers and writes them in files ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found