楼主: 牛尾巴
2568 12

【2016新书】Docker in Practice [推广有奖]

泰斗

38%

还不是VIP/贵宾

-

TA的文库  其他...

最新e书

2018新书

2017新书

威望
8
论坛币
628880 个
通用积分
56892.4593
学术水平
12683 点
热心指数
12959 点
信用等级
12448 点
经验
568600 点
帖子
9173
精华
66
在线时间
13140 小时
注册时间
2008-2-13
最后登录
2024-4-25

特级学术勋章 特级热心勋章 特级信用勋章 高级学术勋章 高级热心勋章 高级信用勋章

相似文件 换一批

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
图书名称:Docker in Practice
作者:Ian Miell, Aidan Hobson Sayers

出版社:Manning Publications

页数:372
出版时间:2016
                           
语言:English

格式:pdf
内容简介:
Summary
An open source container system, Docker makes deploying applications painless and flexible. Docker is powerful and simple to use, and it makes life easier for developers and administrators alike providing shorter build times, fewer production bugs, and effortless application roll-out.
About the Book
Docker in Practice is a hands-on guide that covers 101 specific techniques you can use to get the most out of Docker. Following a cookbook-style Problem/Solution/Discussion format, this practical handbook gives you instantly useful solutions for important problems like effortless server maintenance and configuration, deploying microservices, creating safe environments for experimentation, and much more. As you move through this book, you’ll advance from basics to Docker best practices like using it with your Continuous Integration process, automating complex container creation with Chef, and orchestration with Kubernetes.
What’s Inside
  • Speeding up your DevOps pipeline
  • Cheaply replacing VMs
  • Streamlining your cloud workflow
  • Using the Docker Hub
  • Navigating the Docker ecosystem
About the Reader
For anyone interested in real-world Docker.
About the Authors
Ian Miell and Aidan Hobson Sayers have contributed to Docker and have extensive experience building and maintaining commercial Docker-based infrastructures in large-scale environments.
Table of Contents

    PART 1: DOCKER FUNDAMENTALS
  • DISCOVERING DOCKER
  • UNDERSTANDING DOCKER - INSIDE THE ENGINE ROOM
    PART 2: DOCKER AND DEVELOPMENT
  • USING DOCKER AS A LIGHTWEIGHT VIRTUAL MACHINE
  • DAY-TO-DAY DOCKER
  • CONFIGURATION MANAGEMENT - GETTING YOUR HOUSE IN ORDER
    PART 3: DOCKER AND DEVOPS
  • CONTINUOUS INTEGRATION: SPEEDING UP YOUR DEVELOPMENT PIPELINE
  • CONTINUOUS DELIVERY: A PERFECT FIT FOR DOCKER PRINCIPLES
  • NETWORK SIMULATION: REALISTIC ENVIRONMENT TESTING WITHOUT THE PAIN
    PART 4: DOCKER IN PRODUCTION
  • CONTAINER ORCHESTRATION: MANAGING MULTIPLE DOCKER CONTAINERS
  • DOCKER AND SECURITY
  • PLAIN SAILING - DOCKER IN PRODUCTION AND OPERATIONAL CONSIDERATIONS
  • DOCKER IN PRODUCTION: DEALING WITH CHALLENGES

回复免费:

本帖隐藏的内容

Docker in Practice (2016).pdf (6.35 MB)







二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:Practice practic ACT CTI TIC providing English shorter system simple

已有 1 人评分经验 论坛币 收起 理由
Nicolle + 100 + 100 精彩帖子

总评分: 经验 + 100  论坛币 + 100   查看全部评分

本帖被以下文库推荐

沙发
fumingxu 发表于 2016-6-10 21:51:49 |只看作者 |坛友微信交流群
  1. Technique 10 Converting your VM to a container
  2. The Docker Hub doesn’t have all possible base images, so for some niche Linux distributions and use cases, people need to create their own. The same principle applies if you have an existing state in a VM you want to put inside Docker to iterate on top of or to benefit from the Docker ecosystem.

  3. Ideally you’d want to build an equivalent of your VM from scratch using standard Docker techniques, such as Dockerfiles combined with standard configuration management tools (see chapter 5). The reality, though, is that many VMs are not carefully configuration-managed. This might happen because a VM has grown organically as people have used it, and the investment needed to recreate it in a more structured way isn’t worth it.

  4. Problem
  5. You have a VM you want to convert to a Docker image.

  6. Solution
  7. Create a TAR file of your VM filesystem, using either qemu-nbd, tar over ssh, or another method, and use the ADD command in a Dockerfile on your TAR to create your image.
复制代码

已有 1 人评分论坛币 收起 理由
Nicolle + 20 精彩帖子

总评分: 论坛币 + 20   查看全部评分

使用道具

藤椅
william9225 学生认证  发表于 2016-6-10 21:53:13 来自手机 |只看作者 |坛友微信交流群
  1. Technique 19 Docker volumes—problems of persistence
  2. Much of the power of containers comes from the fact that they encapsulate as much of the state of the environment’s filesystem as is useful.

  3. Sometimes, though, you don’t want to put files into a container. You might have some large files that you want to share across containers or manage separately. The classic example is the large, centralized database that you want your container to access, but you also want other (perhaps more traditional) clients to access alongside your new-fangled containers.

  4. The solution is volumes, Docker’s mechanism for managing files outside the lifecycle of the container. Although this goes against the philosophy of containers being “deployed anywhere” (you won’t be able to deploy your database-dependent container where there’s no compatible database available to mount, for example), it’s a useful feature for real-world Docker use.

  5. Problem
  6. You want to access files on the host from within a container.

  7. Solution
  8. Use Docker’s volume flag to access host files from within the container.
复制代码

已有 1 人评分论坛币 收起 理由
Nicolle + 20 精彩帖子

总评分: 论坛币 + 20   查看全部评分

使用道具

板凳
h2h2 发表于 2016-6-10 22:21:30 |只看作者 |坛友微信交流群
  1. Technique 40 Create reliable bespoke tools with ENTRYPOINT
  2. Docker’s potential for allowing you to run commands anywhere means that complex bespoke instructions or scripts run on the command line can be preconfigured and wrapped up into a packaged tool.

  3. The easily misunderstood ENTRYPOINT instruction is a vital part of this. You’re going to see how it enables you to create Docker images as tools that are well-encapsulated, clearly defined, and flexible enough to be useful.

  4. Problem
  5. You want to define the command the container will run, but leave the command’s arguments up to the user.

  6. Solution
  7. Use the Dockerfile ENTRYPOINT instruction.
复制代码

已有 1 人评分论坛币 收起 理由
Nicolle + 20 精彩帖子

总评分: 论坛币 + 20   查看全部评分

使用道具

报纸
frankguo2006 发表于 2016-6-10 23:08:14 |只看作者 |坛友微信交流群
  1. Technique 41 Avoid package drift by specifying versions in your build
  2. Dockerfiles have simple syntax and limited functionality, they can help greatly to clarify your build’s requirements, and they can aid the stability of image production, but they can’t guarantee repeatable builds. We’re going to explore one of the numerous approaches to solving this problem and reducing the risk of nasty surprises when the underlying package management dependencies change.

  3. This technique is helpful for avoiding those “it worked yesterday” moments, and it may be familiar if you’ve used classic configuration management tools. Building Docker images is fundamentally quite different from maintaining a server, but some hard-learned lessons are still applicable.

  4. Debian-based images only
  5. This technique will only work for Debian-based images, such as Ubuntu.

  6. Problem
  7. You want to ensure that your deb packages are the versions you expect.

  8. Solution
  9. Run a script to capture the versions of all dependent packages on a verified installed system and capture the dependent versions. Install the specific versions in your Dockerfile.
复制代码

已有 1 人评分论坛币 收起 理由
Nicolle + 20 精彩帖子

总评分: 论坛币 + 20   查看全部评分

使用道具

地板
neuroexplorer 发表于 2016-6-11 03:06:09 |只看作者 |坛友微信交流群
  1. Technique 42 Replacing text with perl -p -i -e
  2. It’s not uncommon when building images with Dockerfiles to need to replace specific items of text across multiple files. Numerous solutions for this exist, but we’ll introduce a somewhat unusual favorite that’s particularly handy in Dockerfiles.

  3. Problem
  4. You want to alter specific lines in files during a build.

  5. Solution
  6. Use perl -p -i -e.
复制代码

已有 1 人评分论坛币 收起 理由
Nicolle + 20 精彩帖子

总评分: 论坛币 + 20   查看全部评分

使用道具

7
albertwishedu 发表于 2016-6-11 08:46:09 |只看作者 |坛友微信交流群
  1. Technique 55 Using the Docker Hub workflow
  2. This technique introduces you to the Docker Hub workflow, which enables you to trigger rebuilds of your images.

  3. Docker.com account required
  4. For this section you’ll need an account on docker.com linked to either a GitHub or a Bitbucket account. If you don’t already have these set up and linked, instructions are available from the homepages of github.com and bitbucket.org.

  5. Problem
  6. You want to automatically test and push changes to your image when the code changes.

  7. Solution
  8. Set up a Docker Hub repository and link it to your code.
复制代码

已有 1 人评分论坛币 收起 理由
Nicolle + 20 精彩帖子

总评分: 论坛币 + 20   查看全部评分

使用道具

8
jackson_shi 发表于 2016-6-12 00:11:48 |只看作者 |坛友微信交流群
  1. Technique 56 Speed up I/O-intensive builds with eatmydata
  2. Because Docker is a great fit for automated building, you’ll likely perform a lot of disk-I/O-intensive builds as time goes on. Jenkins jobs, database rebuild scripts, and large code checkouts will all hit your disks hard. In these cases, you’ll be grateful for any speed increases you can get, both to save time and to minimize the many overheads that result from resource contention.

  3. This technique has been shown to give up to a 1/3 speed increase, and our experience backs this up. This is not to be sniffed at!

  4. Problem
  5. You want to speed up your I/O-intensive builds.

  6. Solution
  7. Install eatmydata on your image.
复制代码

已有 1 人评分论坛币 收起 理由
Nicolle + 20 精彩帖子

总评分: 论坛币 + 20   查看全部评分

使用道具

9
springsfeng 发表于 2016-6-13 13:20:39 |只看作者 |坛友微信交流群
  1. Technique 57 Set up a package cache for faster builds
  2. As Docker lends itself to frequent rebuilding of services for development, testing, and production, you can quickly get to a point where you’re repeatedly hitting the network a lot. One major cause is downloading package files from the internet. This can be a slow (and costly) overhead, even on a single machine. This technique shows you how to set up a local cache for your package downloads, covering apt and yum.

  3. Problem
  4. You want to speed up your builds by reducing network I/O.

  5. Solution
  6. Install a Squid proxy for your package manager.
复制代码

已有 1 人评分论坛币 收起 理由
Nicolle + 20 精彩帖子

总评分: 论坛币 + 20   查看全部评分

使用道具

10
gyrolee 发表于 2016-6-16 06:44:31 |只看作者 |坛友微信交流群
  1. Technique 58 Running Selenium tests inside Docker
  2. One Docker use case we haven’t yet examined in much detail is running graphical applications. In chapter 3, VNC was used to connect to containers during the “save game” approach to development (technique 14), but this can be clunky—windows are contained inside the VNC viewer window, and desktop interaction can be a little limited. We’ll explore an alternative to this by demonstrating how to write graphical tests using Selenium and also show you how this image can be used to run the tests as part of your CI workflow.

  3. Problem
  4. You want to be able to run graphical programs in your CI process while having the option to display those same graphical programs on your own screen.

  5. Solution
  6. Share your X11 server socket to view the programs on your own screen, and use xvfb in your CI process.
复制代码

已有 1 人评分论坛币 收起 理由
Nicolle + 20 精彩帖子

总评分: 论坛币 + 20   查看全部评分

使用道具

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注jltj
拉您入交流群

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-4-25 18:57