Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Docker Cookbook

You're reading from   Docker Cookbook Over 100 practical and insightful recipes to build distributed applications with Docker

Arrow left icon
Product type Paperback
Published in Aug 2018
Publisher
ISBN-13 9781788626866
Length 352 pages
Edition 2nd Edition
Tools
Arrow right icon
Authors (3):
Arrow left icon
 Cochrane Cochrane
Author Profile Icon Cochrane
Cochrane
Jeeva S. Chelladhurai Jeeva S. Chelladhurai
Author Profile Icon Jeeva S. Chelladhurai
Jeeva S. Chelladhurai
 K Khare K Khare
Author Profile Icon K Khare
K Khare
Arrow right icon
View More author details
Toc

Table of Contents (19) Chapters Close

Title Page
Copyright and Credits
Dedication
Packt Upsell
Contributors
Preface
1. Introduction and Installation FREE CHAPTER 2. Working with Docker Containers 3. Working with Docker Images 4. Network and Data Management for Containers 5. Docker Use Cases 6. Docker APIs and SDKs 7. Docker Performance 8. Docker Orchestration and Hosting a Platform 9. Docker Security 10. Getting Help and Tips and Tricks 11. Docker on the Cloud 1. Other Books You May Enjoy Index

Starting Docker in debug mode


We can start Docker in debug mode to debug logs.

Getting ready

I hope you already have Docker installed on your system by now.

How to do it...

Follow these steps:

  1. Start the docker daemon with the debug option, -D. To start from the command line, you can run the following command:
         $ dockerd  -D
  1. You can also add the debug option in the Docker configuration file to start in debug mode:
         $ cat /etc/docker/daemon.json
    { "debug": true }

 

 

How it works...

The preceding command will start Docker in daemon mode. You will see lots of useful messages as you start the daemon, such as loading up existing images, settings for firewalls (iptables), and so on. If you start a container, you will see messages like the following:

$ docker container run alpine echo "hello world"

On Ubuntu 18.04, the Docker daemon logs can be viewed by running this command: 

$ journalctl -u docker.service

Note

If you are using something other than Ubuntu 18.04, your Docker logs might be located...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime
Visually different images