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
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Docker Quick Start Guide
Docker Quick Start Guide

Docker Quick Start Guide: Learn Docker like a boss, and finally own your applications

eBook
€13.98 €19.99
Paperback
€24.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

Docker Quick Start Guide

Learning Docker Commands

In this chapter, we will learn some essential Docker commands. While we focus on one of the most important commands, the container run command, we will also cover many other commands that you will be using every day. These commands include the list container command, the stop container command, and the remove container command. Along the way, we will also discover other container commands such as logs, inspect, stats, attach, exec, and commit. I think you will find this chapter to be an excellent foundation for Docker education.

BIC: The Bureau of International des Containers was founded in 1933 as a neutral, non-profit, international organization whose mission is to promote the safe, secure, and sustainable expansion of containerization and intermodal transportation.

By the end of this chapter, you will know the following:

  • The current and previous command...

Technical requirements

Information about command syntax

Before we dive into learning about Docker commands and their many options, I want to inform you of a change to the Docker CLI that happened in January 2017.

The number of commands and associated options have been increasing with each new release of Docker. Docker decided that the complexity this was creating needed to be addressed. So, with the release of Docker version 1.13 (Docker also changed the version numbing scheme in 2017), the CLI commands have been divided into management functional groups. For example, there is now a container management group of commands, and an image management group of commands. This changes how you run Docker commands. Here is an example of the use of the old and new run command:

# the new command syntax...
docker container run hello-world
# the old command syntax...
docker run hello-world

This change provides better...

The version command

You have already used the docker --version command as a quick test to confirm that Docker was installed. Now try the command without the dashes:

docker version

This version of the command gives you greater detail about the version of Docker installed on your system. It is worth noting that the docker-compose command, which we will talk about later, also has two versions of the version command—one with the dashes providing a single-line response, and one without the dashes that delivers more details.

Remember that all the Docker commands have a rich help system built in. Try it by entering any part of a Docker command and using the --help parameter. For example, docker container run --help.

The Docker run command

Since we will be using the run command a lot, we should take a look at that now. You have already used the run command in its most basic form:

# new syntax
# Usage: docker container run [OPTIONS] IMAGE [COMMAND] [ARG...]
docker container run hello-world

# old syntax
docker run hello-world

This command tells Docker that you want to run a container based on the image described as hello-world. You may be asking yourself, did the hello-world container image get installed when I installed Docker? The answer is no. The docker run command will look at the local container image cache to see whether there is a container image that matches the description of the requested container. If there is, Docker will run the container from the cached image. If the desired container image is not found in the cache, Docker will reach out to a Docker registry to try to download the...

Summary

In this chapter, we learned about Docker image descriptions and a little about Docker registries. Then we saw that there is another form of the version command. After that, we explored a lot of Docker container commands, including run, stop, ls, logs, top, stats, attach, exec, and the commit command. Finally, we found out how to expose your containers by opening ports from your host and to your containers. You should feel pretty good about what you can do with Docker already, but hang on—in Chapter 3, Creating Docker Images, we are going to show you how to create your own Docker images with a Dockerfile and the image build command. If you're ready, turn the page.

References

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Learn Docker installation on different types of OS
  • Get started with developing Docker images
  • Use Docker with your Jenkins CI/CD system

Description

Docker is an open source software platform that helps you with creating, deploying, and running your applications using containers. This book is your ideal introduction to Docker and containerization. You will learn how to set up a Docker development environment on a Linux, Mac, or Windows workstation, and learn your way around all the commands to run and manage your Docker images and containers. You will explore the Dockerfile and learn how to build your own enterprise-grade Docker images. Then you will learn about Docker networks, Docker swarm, and Docker volumes, and how to use these features with Docker stacks in order to define, deploy, and maintain highly-scalable, fault-tolerant multi-container applications. Finally, you will learn how to leverage Docker with Jenkins to automate the building of Docker images and the deployment of Docker containers. By the end of this book, you will be well prepared when it comes to using Docker for your next project.

Who is this book for?

This guide is for anyone who needs to make a quick decision about using Docker for their next project. It is for developers who want to get started using Docker right away.

What you will learn

  • Set up your Docker workstation on various platforms
  • Utilize a number of Docker commands with parameters
  • Create Docker images using Dockerfiles
  • Learn how to create and use Docker volumes
  • Deploy multi-node Docker swarm infrastructure
  • Create and use Docker local and remote networks
  • Deploy multi-container applications that are HA and FT
  • Use Jenkins to build and deploy Docker images

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Nov 29, 2018
Length: 230 pages
Edition : 1st
Language : English
ISBN-13 : 9781789347326
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 : Nov 29, 2018
Length: 230 pages
Edition : 1st
Language : English
ISBN-13 : 9781789347326
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 103.97
Docker Quick Start Guide
€24.99
Docker Cookbook
€36.99
Mastering Docker
€41.99
Total 103.97 Stars icon

Table of Contents

9 Chapters
Setting up a Docker Development Environment Chevron down icon Chevron up icon
Learning Docker Commands Chevron down icon Chevron up icon
Creating Docker Images Chevron down icon Chevron up icon
Docker Volumes Chevron down icon Chevron up icon
Docker Swarm Chevron down icon Chevron up icon
Docker Networking Chevron down icon Chevron up icon
Docker Stacks Chevron down icon Chevron up icon
Docker and Jenkins Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.7
(12 Ratings)
5 star 91.7%
4 star 0%
3 star 0%
2 star 0%
1 star 8.3%
Filter icon Filter
Top Reviews

Filter reviews by




Amazon Customer Oct 20, 2019
Full star icon Full star icon Full star icon Full star icon Full star icon 5
It's easy follow. and very good to practice basic.
Amazon Verified review Amazon
JK Mar 23, 2019
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This book is down to earth and full of actually executable commands with output screen shots. No fluff. I have just started using Docker at work for containerizing apps for K8s, and I could use this book back and forth to see if what I am doing is correct. In fact I learnt k8s pv and pvc concepts easily from reading chapter 4 of this book 'Docker Volumes'.Chapter 5 & 7 I did not use much because I am already on k8s and I did not go deeper into Chapter 6 because I am not a networking guy. The last chapter 'Docker and Jenkins', I am yet to read but it is not a top priority thing for me as our DevOps/CICD teams take care of that. I am a developer and all that I wanted I got from Chapters 1 to 4. Chapter 3 'Creating Docker Images' specifically is a power packed one.I would definitely say, one can buy this book blindly, if you are really interested in hands on docker learning.Thanks Mr.Earl Waud, Great Book!
Amazon Verified review Amazon
MM Oct 12, 2019
Full star icon Full star icon Full star icon Full star icon Full star icon 5
He is a best writer . Make the concept very easy. He wrote it with easy English and very organized way. I made my concept clear in a single read. He is super Genius writer. He knows about the reader's mind. He also knows how to make easy of any hard concept.
Amazon Verified review Amazon
Marjan Khan Jan 15, 2019
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This book is an invaluable resource to get up to speed with containers. I have been working with VMware for the past 10 years, but more and more I am seeing containers take hold in the provisioning of software. I knew of containers to the extend that I could download a container and use what it offered, but did not really know how to build my own let alone persist changes, mount volumes, and setup networking.I recently had to build a custom tool to aid in a migration and rather than reach to building a dedicated VM, I opted to build it in a docker container. Not only was I able to iterate over multiple revisions of the tool quickly, but I also found that deploying into production was far easier, faster, and more secure thanks to the far smaller footprint containers offered. Without the aid of this book I am sure that I would have spent a lot more time in this endeavor and may have just opted to using a VM. I am very glad I did not :) I have found this book to be a great resource, clearly explaining all of the aspects of docker containers that I needed to kickstart my journey into the world of Docker, and I am sure you will too. ( Two Thumbs Up !! )
Amazon Verified review Amazon
Ben Weston Apr 07, 2022
Full star icon Full star icon Full star icon Full star icon Full star icon 5
At just 214 pages (including index) you wouldn't expect much from such a small book except perhaps a high level overview of the topics. However this is not the case. The book is absolutely packed with good information and doesn't waste a single page. Starting with initial setup & basic commands, you'll be shown best practice methods on how to create & manage containers using Docker, but it goes far deeper than that. Advanced concepts such as practical & easy to follow examples on third-party (remote) network drivers are explored. There is a LOT of information to take in for such a small book, so if you're looking for the maximum amount of info for the best value & smallest footprint I highly recommend this.
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.