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
€18.99 per month
Full star icon Empty star icon Empty star icon Empty star icon Empty star icon 1 (1 Ratings)
Paperback 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
€18.99 per month
Full star icon Empty star icon Empty star icon Empty star icon Empty star icon 1 (1 Ratings)
Paperback 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 a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
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 : 9781783552344
Vendor :
Docker
Tools :

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details

Publication date : Mar 30, 2017
Length: 290 pages
Edition : 1st
Language : English
ISBN-13 : 9781783552344
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

What is included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.