Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Docker High Performance

You're reading from   Docker High Performance Complete your Docker journey by optimizing your application's work?ows and performance

Arrow left icon
Product type Paperback
Published in Apr 2019
Publisher
ISBN-13 9781789807219
Length 174 pages
Edition 2nd Edition
Tools
Arrow right icon
Authors (2):
Arrow left icon
Russ McKendrick Russ McKendrick
Author Profile Icon Russ McKendrick
Russ McKendrick
Allan Espinosa Allan Espinosa
Author Profile Icon Allan Espinosa
Allan Espinosa
Arrow right icon
View More author details
Toc

Table of Contents (11) Chapters Close

Inspecting containers with the docker exec command


When troubleshooting servers, the traditional way to debug is to log in and poke around the machine. With Docker, this typical workflow is split into two steps: the first is logging in to the Docker host using standard remote access tools such as SSH, and the second is entering the desired running container's process namespace with the docker exec command. This is useful as a last resort to debug what is happening inside our application.

For most of this chapter, we will troubleshoot and debug a Docker container running HAProxy. The following steps will prepare the sample container service:

  1. First, we will create the configuration for HAProxy named haproxy.cfg with the following content:
defaults
  mode http
  timeout connect 5000ms
  timeout client 50000ms
  timeout server 50000ms

frontend stats
  bind 127.0.0.1:80
  stats enable

listen http-in
  bind *:80
  server server1 www.debian.org:80
  1. Next, we will prepare a Compose file, compose.yml...
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 €18.99/month. Cancel anytime