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

Data-only container


Data can be stored outside the Docker UFS in a data-only container. The data will be visible inside the data-only container mount namespace. As the data is persisted outside the container, it remains even after the container is deleted. If any other container wants to connect to this data-only container, simply use the --volumes-from option to grab the container and apply it to the current container. Let's try out data volume container:

Using a data-only container

Creating a data-only container

$ docker create -v /tmp --name ubuntuvolume Ubuntu:14.04

In the preceding command, we created an Ubuntu container and attached /tmp. It is a data-only container based on the Ubuntu image, and exists in the /tmp directory. If the new Ubuntu container needs to write some data to the /tmp directory of our data-only container, this can be achieved with help of --volumes-from option. Now, anything we write to the /tmp directory of the new container will be saved in the /tmp volume of...

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