Learning Docker

1. 数据卷和数据卷容器的区别:

在看这两个东西的时候一时脑子转不过来,心想数据卷就够了,为什么还要数据卷容器。

主要是总是看到这一句:“如果用户需要在多个容器之间共享一些持续更新的数据,最简单的方式是使用数据卷容器。”

心想数据卷同样也能在不同容器间共享啊。确实是这样。

区别其实很简单:数据卷是指容器挂载宿主机的目录;数据卷容器是这样:新建一个特殊容器(只包含数据目录),然后其他容器挂载这个特殊容器中的目录。

这下明白了吧。Think Different!

 

2. CMD和ENTRYPOINT的区别:

基本没啥区别,反正能实现同一个功能,就是容器起来后运行一条启动命令。

若这条启动命令是必须运行,用ENTRYPOINT;否则,无关紧要的话用CMD。概念上的区别,实质一致。

3. 国内镜像

https://docker.mirrors.ustc.edu.cn

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Optimize the power of Docker to run your applications quickly and easily About This Book Learn to compose, use, and publish the Docker containers Leverage the features of Docker to deploy your existing applications Explore real world examples of securing and managing Docker containers Who This Book Is For If you are an application developer who wants to learn Docker in order to utilize its features for application deployment, then this book is for you. No prior knowledge of Docker is required. What You Will Learn Build a Docker image using Dockerfiles Push and publish images on Docker Hub Run your own private Docker Hub and upload images onto it Create and run services inside a container to deploy your applications with ease Share data between the Docker host and containers Orchestrate multiple containers with Docker Compose Test and debug applications inside a Docker container Secure your Docker containers with SELinux In Detail Docker is a next-generation platform for simplifying application containerization life-cycle. Docker allows you to create a robust and resilient environment in which you can generate portable, composable, scalable, and stable application containers. This book is a step-by-step guide that will walk you through the various features of Docker from Docker software installation to the impenetrable security of containers. The book starts off by elucidating the installation procedure for Docker and a few troubleshooting techniques. You will be introduced to the process of downloading Docker images and running them as containers. You'll learn how to run containers as a service (CaaS) and also discover how to share data among containers. Later on, you'll explore how to establish the link between containers and orchestrate containers using Docker Compose. You will also come across relevant details about application testing inside a container. You will discover how to debug a container using the docker exec command and the nsenter tool. Finally, you will learn how to secure your containers with SELinux and other proven methods. Table of Contents Chapter 1. Getting Started with Docker Chapter 2. Handling Docker Containers Chapter 3. Building Images Chapter 4. Publishing Images Chapter 5. Running Your Private Docker Infrastructure Chapter 6. Running Services in a Container Chapter 7. Sharing Data with Containers Chapter 8. Orchestrating Containers Chapter 9. Testing with Docker Chapter 10. Debugging Containers Chapter 11. Securing Docker Containers
Learning Docker - Second Edition by Jeeva S. Chelladhurai English | 31 May 2017 | ASIN: B01MSJB4MD | 300 Pages | AZW3 | 3.66 MB Docker lets you create, deploy, and manage your applications anywhere at anytime – flexibility is key so you can deploy stable, secure, and scalable app containers across a wide variety of platforms and delve into microservices architecture About This Book This up-to-date edition shows how to leverage Docker's features to deploy your existing applications Learn how to package your applications with Docker and build, ship, and scale your containers Explore real-world examples of securing and managing Docker containers Who This Book Is For This book is ideal for developers, operations managers, and IT professionals who would like to learn about Docker and use it to build and deploy container-based apps. No prior knowledge of Docker is expected. What You Will Learn Develop containerized applications using the Docker version 17.03 Build Docker images from containers and launch them Develop Docker images and containers leveraging Dockerfiles Use Docker volumes to share data Get to know how data is shared between containers Understand Docker Jenkins integration Gain the power of container orchestration Familiarize yourself with the frequently used commands such as docker exec, docker ps, docker top, and docker stats In Detail Docker is an open source containerization engine that offers a simple and faster way for developing and running software. Docker containers wrap software in a complete filesystem that contains everything it needs to run, enabling any application to be run anywhere – this flexibily and portabily means that you can run apps in the cloud, on virtual machines, or on dedicated servers. This book will give you a tour of the new features of Docker and help you get started with Docker by building and deploying a simple application. It will walk you through the commands required to manage Docker images and containers. You'l
Key Features Set up, configure, and monitor a virtual network of containers using a bridge network and virtual switches Master the skill of networking Docker Containers using frameworks such as Kubernetes, Docker Swarm, and Mesosphere Acquire hands-on experience through practical examples of Docker networking spanning multiple containers, over multiple hosts, clubbed with various frameworks Book Description Docker is a Linux container implementation that enables the creation of light weight portable development and production environments. These environments can be updated incrementally. Docker achieves this by leveraging containment principles like cgroups and Linux namespaces along with Overlay filesystem based portable images. Docker provides the networking primitives that allow administrators to specify how different containers network with each application and connect each of its components, then distribute them across a large number of servers and ensure coordination between them irrespective of the host or VM they are running in. This book will show you how to create, deploy, and manage a virtual network for connecting containers spanning single or multiple hosts. What you will learn Get to know the basics of networking and see how Docker networking works Expose the strengths and weaknesses of the current Docker network implementation and third party landscape Understand Docker networking spanning multiple containers over multiple hosts through practical examples Observe the pitfalls of Docker networking and how to overcome them Learn how Docker networking works for Docker Swarm and Kubernetes Configure Networking using Docker's container network model (CNM) Explore OpenvSwitch to connect contain About the Author Rajdeep Dua has over 16 years of experience in distributed systems. He has worked in R&D and Developer Relation roles at Microsoft, Google, VMware, and Salesforce.com. He has exposure to multiple cloud platforms like Google App Engine, Heroku, Forc

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值