Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Troubleshooting Docker
Troubleshooting Docker

Troubleshooting Docker: Develop, test, automate, and deploy production-ready Docker containers

Arrow left icon
Profile Icon Navid Ahmed Shaikh Profile Icon Vaibhav Kohli Profile Icon John Wooten Profile Icon Dua
Arrow right icon
€8.99 €29.99
Full star icon Empty star icon Empty star icon Empty star icon Empty star icon 1 (1 Ratings)
eBook Mar 2017 290 pages 1st Edition
eBook
€8.99 €29.99
Paperback
€36.99
Subscription
Free Trial
Renews at €18.99p/m
Arrow left icon
Profile Icon Navid Ahmed Shaikh Profile Icon Vaibhav Kohli Profile Icon John Wooten Profile Icon Dua
Arrow right icon
€8.99 €29.99
Full star icon Empty star icon Empty star icon Empty star icon Empty star icon 1 (1 Ratings)
eBook Mar 2017 290 pages 1st Edition
eBook
€8.99 €29.99
Paperback
€36.99
Subscription
Free Trial
Renews at €18.99p/m
eBook
€8.99 €29.99
Paperback
€36.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

Troubleshooting Docker

Chapter 2. Docker Installation

Docker installation is pretty smooth in most of the operating systems, and there are very few chances of things going wrong. Docker Engine installation is supported mostly on all the Linux, Cloud, Windows, and Mac OS X environments. If the Linux version is not supported, then Docker Engine can be installed using binaries. Docker binary installation is mostly oriented for hackers who want to try out Docker on a variety of OS. It usually involves checking runtime dependencies, kernel dependencies, and using Docker platform-specific binaries in order to move ahead with installation.

Docker Toolbox is an installer, which can be used to quickly install and set up a Docker environment on your Windows or Mac machine. Docker toolbox also installs:

  • Docker client: It executes commands, such as build and run, and ship containers by communicating with the Docker daemon
  • Docker Machine: It is a tool used to install Docker Engine on virtual hosts and manages them...

Installing Docker on Ubuntu

Let's get started with installing Docker on Ubuntu 14.04 LTS 64-bit. We can use AWS AMI in order to create our setup. The image can be launched on AMI directly with the help of following link:

http://thecloudmarket.com/image/ami-a21529cc--ubuntu-images-hvm-ssd-ubuntu-trusty-14-04-amd64-server-20160114-5

The following diagram illustrates the installation steps required to install Docker on Ubuntu 14.04 LTS:

Installing Docker on Ubuntu

Prerequisites

Docker requires a 64-bit installation, regardless of the Ubuntu version. The kernel must be 3.10 at minimum.

Let's check our kernel version, using the following command:

$ uname -r

The output is a kernel version of 3.13.x, which is fine:

3.13.0-74-generic

Updating package information

Perform the following steps to update the APT repository and have necessary certificates installed:

  1. Docker's APT repository contains Docker 1.7.x or higher. To set APT to use packages from the new repository:
            $ sudo apt-get update
    
    
  2. Run the following...

Installing Docker on Red Hat Linux

Docker is supported on Red Hat Enterprise Linux 7.x. This section provides an overview of installation of Docker using Docker-managed release packages and installation mechanisms. Using these packages ensures that you will be able get the latest release of Docker.

Installing Docker on Red Hat Linux

Checking kernel version

The Linux kernel version can be checked with the help of the following command:

$ uname -r

The output, in our case, is kernel version 3.10.x, which will work fine:

3.10.0-327.el7.x86 _64

Updating the YUM packages

The YUM repository can be updated, using the following command:

$ sudo yum update

Output listing is given; ensure that it shows Complete! at the end, as follows:

Loaded plugins: amazon-id, rhui-lb, search-disabled-repos 
rhui-REGION-client-config-server-7       | 2.9 kB   
.... 
Running transaction check 
Running transaction test 
Transaction test succeeded 
Running transaction 
  Installing : linux-firmware-20150904-43.git6ebf5d5.el7.noarch      1/138  
  Updating...

Deploy CentOS VM on AWS to run Docker containers

We are using AWS as an environment to showcase Docker installation from a convenience perspective. If an OS needs to be tested for support of its Docker version, AWS is the easiest and quickest way to deploy and test it.

If you are not using AWS as an environment, feel free to skip the steps involving spinning a VM on AWS.

In this section, we'll take a look at deploying CentOS VM on AWS to get the environment up and running fast and deploy Docker containers. CentOS is similar to Red Hat's distribution and uses the same packaging tools like YUM. We will use CentOS 7.x, on which Docker is officially supported:

First, let's launch a CentOS-based VM on AWS:

Deploy CentOS VM on AWS to run Docker containers

We are launching with a 1-Click Launch and pre-existing keypair. SSH is enabled by default:

Deploy CentOS VM on AWS to run Docker containers

Once the instance is up, get the public IP address from the AWS EC2 console.

SSH into the instance and follow the following steps for installation:

$ ssh -i &quot...

Installing Docker on CoreOS

CoreOS is a lightweight OS built for the cloud. It comes prepackaged with Docker, which is a few releases behind the latest version. Since it comes prebuilt with Docker there is little troubleshooting required. We just need to make sure that the right version of CoreOS is picked.

CoreOS runs on a variety of platforms, including Vagrant, Amazon EC2, QEMU/KVM, VMware and OpenStack, and custom hardware. CoreOS uses fleet to manage clusters of containers along with etcd (key value data store).

Installation channels of CoreOS

In our case, we will use stable  Release Channels:

Installation channels of CoreOS

First, we will install CoreOS on AWS using the CloudFormation templates. You can find this template at the following link:

 https://s3.amazonaws.com/coreos.com/dist/aws/coreos-stable-pv.template

This template provides the following parameters:

  • Instance type
  • Cluster size
  • Discovery URL
  • Advertised IP address
  • Allow SSH From
  • Keypair

These mentioned parameters can be set in the default template...

Installing Docker on Ubuntu


Let's get started with installing Docker on Ubuntu 14.04 LTS 64-bit. We can use AWS AMI in order to create our setup. The image can be launched on AMI directly with the help of following link:

http://thecloudmarket.com/image/ami-a21529cc--ubuntu-images-hvm-ssd-ubuntu-trusty-14-04-amd64-server-20160114-5

The following diagram illustrates the installation steps required to install Docker on Ubuntu 14.04 LTS:

Prerequisites

Docker requires a 64-bit installation, regardless of the Ubuntu version. The kernel must be 3.10 at minimum.

Let's check our kernel version, using the following command:

$ uname -r

The output is a kernel version of 3.13.x, which is fine:

3.13.0-74-generic

Updating package information

Perform the following steps to update the APT repository and have necessary certificates installed:

  1. Docker's APT repository contains Docker 1.7.x or higher. To set APT to use packages from the new repository:

            $ sudo apt-get update
    
    
  2. Run the following command...

Installing Docker on Red Hat Linux


Docker is supported on Red Hat Enterprise Linux 7.x. This section provides an overview of installation of Docker using Docker-managed release packages and installation mechanisms. Using these packages ensures that you will be able get the latest release of Docker.

Checking kernel version

The Linux kernel version can be checked with the help of the following command:

$ uname -r

The output, in our case, is kernel version 3.10.x, which will work fine:

3.10.0-327.el7.x86 _64

Updating the YUM packages

The YUM repository can be updated, using the following command:

$ sudo yum update

Output listing is given; ensure that it shows Complete! at the end, as follows:

Loaded plugins: amazon-id, rhui-lb, search-disabled-repos 
rhui-REGION-client-config-server-7       | 2.9 kB   
.... 
Running transaction check 
Running transaction test 
Transaction test succeeded 
Running transaction 
  Installing : linux-firmware-20150904-43.git6ebf5d5...

Deploy CentOS VM on AWS to run Docker containers


We are using AWS as an environment to showcase Docker installation from a convenience perspective. If an OS needs to be tested for support of its Docker version, AWS is the easiest and quickest way to deploy and test it.

If you are not using AWS as an environment, feel free to skip the steps involving spinning a VM on AWS.

In this section, we'll take a look at deploying CentOS VM on AWS to get the environment up and running fast and deploy Docker containers. CentOS is similar to Red Hat's distribution and uses the same packaging tools like YUM. We will use CentOS 7.x, on which Docker is officially supported:

First, let's launch a CentOS-based VM on AWS:

We are launching with a 1-Click Launch and pre-existing keypair. SSH is enabled by default:

Once the instance is up, get the public IP address from the AWS EC2 console.

SSH into the instance and follow the following steps for installation:

$ ssh -i "ubuntu-1404-1.pem" centos@54.238.154.134

...

Installing Docker on CoreOS


CoreOS is a lightweight OS built for the cloud. It comes prepackaged with Docker, which is a few releases behind the latest version. Since it comes prebuilt with Docker there is little troubleshooting required. We just need to make sure that the right version of CoreOS is picked.

CoreOS runs on a variety of platforms, including Vagrant, Amazon EC2, QEMU/KVM, VMware and OpenStack, and custom hardware. CoreOS uses fleet to manage clusters of containers along with etcd (key value data store).

Installation channels of CoreOS

In our case, we will use stable  Release Channels:

First, we will install CoreOS on AWS using the CloudFormation templates. You can find this template at the following link:

 https://s3.amazonaws.com/coreos.com/dist/aws/coreos-stable-pv.template

This template provides the following parameters:

  • Instance type

  • Cluster size

  • Discovery URL

  • Advertised IP address

  • Allow SSH From

  • Keypair

These mentioned parameters can be set in the default template, as follows:

{...
Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • ? Docker programming and installation of ecosystem tools and services, Microservices and N-tier applications ? Creating re-usable, portable containers with help of automation tools ? Learning about using Docker in production projects ? Functions of network and inter-link containers ? Attaching volumes securely to containers ? Consuming and troubleshooting Docker APIs ? Troubleshooting issue of Docker deployment in Public cloud ? Easing the process of container management with Kubernetes

Description

You?re pro Docker? You?ve read all about orchestration with Docker in books? Now learn how to troubleshoot Docker in practice. Gain all the tools to safely see Docker in action with this 2017 book.

Who is this book for?

? Experienced solutions architects, developers, DevOps engineers, programmers, system engineers and administrators ? Those with advanced familiarity with the Linux command line syntax, unit testing, the Docker Registry, Github and leading container hosting platforms and Cloud Service Providers (CSP) ? Anyone looking to build production-ready Docker containers for automated deployment

What you will learn

  • You?ll learn both the basic functions and advanced features for staying safe with Docker. From designing and troubleshooting to automating containers from development to deployment, learn how to effectively containerize and manage Docker.

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Mar 30, 2017
Length: 290 pages
Edition : 1st
Language : English
ISBN-13 : 9781785285363
Vendor :
Docker
Tools :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Mar 30, 2017
Length: 290 pages
Edition : 1st
Language : English
ISBN-13 : 9781785285363
Vendor :
Docker
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 69.98
Monitoring Docker
€32.99
Troubleshooting Docker
€36.99
Total 69.98 Stars icon
Banner background image

Table of Contents

10 Chapters
1. Understanding Container Scenarios and an Overview of Docker Chevron down icon Chevron up icon
2. Docker Installation Chevron down icon Chevron up icon
3. Building Base and Layered Images Chevron down icon Chevron up icon
4. Devising Microservices and N-Tier Applications Chevron down icon Chevron up icon
5. Moving Around Containerized Applications Chevron down icon Chevron up icon
6. Making Containers Work Chevron down icon Chevron up icon
7. Managing the Networking Stack of a Docker Container Chevron down icon Chevron up icon
8. Managing Docker Containers with Kubernetes Chevron down icon Chevron up icon
9. Hooking Volume Baggage Chevron down icon Chevron up icon
10. Docker Deployment in a Public Cloud - AWS and Azure Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Empty star icon Empty star icon Empty star icon Empty star icon 1
(1 Ratings)
5 star 0%
4 star 0%
3 star 0%
2 star 0%
1 star 100%
M. J. Burak Mar 03, 2024
Full star icon Empty star icon Empty star icon Empty star icon Empty star icon 1
This book is 99% about installing docker. There's very little about troubleshooting.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.