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
Troubleshooting Docker

You're reading from   Troubleshooting Docker Develop, test, automate, and deploy production-ready Docker containers

Arrow left icon
Product type Paperback
Published in Mar 2017
Publisher Packt
ISBN-13 9781783552344
Length 290 pages
Edition 1st Edition
Tools
Arrow right icon
Authors (4):
Arrow left icon
John Wooten John Wooten
Author Profile Icon John Wooten
John Wooten
Navid Ahmed Shaikh Navid Ahmed Shaikh
Author Profile Icon Navid Ahmed Shaikh
Navid Ahmed Shaikh
Vaibhav Kohli Vaibhav Kohli
Author Profile Icon Vaibhav Kohli
Vaibhav Kohli
Rajdeep Dua Rajdeep Dua
Author Profile Icon Rajdeep Dua
Rajdeep Dua
Arrow right icon
View More author details
Toc

Table of Contents (11) Chapters Close

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

Pushing images to Docker Hub


We can create a customized image that can then be pushed on Docker Hub using tagging. Let's create a simple image with a small terminal-based application. Create a Dockerfile with the following content:

FROM debian:wheezy 
RUN apt-get update && apt-get install -y cowsay fortune 

Go to the directory containing the Dockerfile and execute the following command to build an image:

$ docker build -t test/cowsay-dockerfile . 
Sending build context to Docker daemon 2.048 kB 
Sending build context to Docker daemon 
Step 0 : FROM debian:wheezy 
wheezy: Pulling from debian 
048f0abd8cfb: Pull complete 
fbe34672ed6a: Pull complete 
Digest: sha256:50d16f4e4ca7ed24aca211446a2ed1b788ab5e3e3302e7fcc11590039c3ab445 
Status: Downloaded newer image for debian:wheezy 
 ---> fbe34672ed6a 
Step 1 : RUN apt-get update && apt-get install -y cowsay fortune 
 ---> Running in ece42dc9cffe

Alternatively...

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 R$50/month. Cancel anytime