• Home
  • Computers
  • The Docker Book: Containerization is the new virtualization

The Docker Book: Containerization is the new virtualization

By James Turnbull

Up-to-date for Docker 1.10.3!

A new publication designed for SysAdmins, Operations employees, builders and DevOps who're attracted to deploying the open resource box carrier Docker.

In this ebook, we are going to will stroll you thru fitting, deploying, coping with, and lengthening Docker. we'll do this by way of first introducing you to the fundamentals of Docker and its parts. Then we will begin to use Docker to construct boxes and companies to accomplish numerous tasks.

We're going to take you thru the improvement lifestyles cycle, from checking out to construction, and spot the place Docker suits in and the way it might probably make your lifestyles more straightforward. we are going to utilize Docker to construct try environments for brand spanking new initiatives, reveal the right way to combine Docker with non-stop integration workflow, after which tips on how to construct program providers and systems. eventually, we will provide help to use Docker's API and the way to increase Docker yourself.

We'll train you the way to:

* set up Docker.

* Take your first steps with a Docker container.

* construct Docker images.

* deal with and proportion Docker images.

* Run and deal with extra advanced Docker containers.

* set up Docker packing containers as a part of your checking out pipeline.

* construct multi-container functions and environments.

* find out about orchestration. Use Compose and Swarm for the orchestration of Docker bins and Consul for carrier discovery.

* discover the Docker API.

* Getting support and increasing Docker.

Updated for Docker 1.10.3!

Show description

Quick preview of The Docker Book: Containerization is the new virtualization PDF

Show sample text content

Let's create a listing, jenkins, to carry any linked records we are going to have to for the construct. $ mkdir jenkins $ cd jenkins contained in the jenkins listing let's commence with a Dockerfile. FROM ubuntu:14. 04 MAINTAINER james@example. com ENV REFRESHED_AT 2014-06-01 RUN apt-get replace -qq && apt-get set up -qqy curl RUN curl https://get. docker. com/gpg | apt-key upload - RUN echo deb http://get. docker. com/ubuntu docker major > /etc/apt/sources. record. d/docker. checklist RUN apt-get replace -qq && apt-get set up -qqy iptables ca-certificates lxc openjdk-6-jdk git-core lxc-docker ENV JENKINS_HOME /opt/jenkins/data ENV JENKINS_MIRROR http://mirrors.

Node identify: 'moe' Datacenter: 'dc1' Server: precise (bootstrap: fake) customer Addr: zero. zero. zero. zero (HTTP: 8500, DNS: fifty three, RPC: 8400) Cluster Addr: 104. 131. 38. fifty six (LAN: 8301, WAN: 8302) Gossip encrypt: fake, RPC-TLS: fake, TLS-Incoming: fake . . . 2014/08/31 21:54:03 [ERR] agent: didn't sync distant nation: No cluster chief 2014/08/31 21:54:03 [INFO] consul: including server curly (Addr: 104. 131. 38. 55:8300) (DC: dc1) 2014/08/31 21:54:03 [INFO] consul: including server larry (Addr: 104. 131. 38. 54:8300) (DC: dc1) 2014/08/31 21:54:03 [INFO] consul: New chief elected: larry we will be able to see from our container's logs that moe has joined the cluster.

Create a multi-configuration activity let us take a look at growing our new multi-configuration task. click the hot activity from the Jenkins console. we'll identify our new task Docker_matrix_job, choose construct multi-configuration undertaking, and click on okay. making a multi-configuration activity. we are going to see a monitor that's similar to the activity production display we observed previous. Let's upload an outline for our task, choose Git as our repository style, and specify our pattern software repository: https://github. com/jamtur01/docker-jenkins-sample.

Again in our Dockerfile now we have used the disclose guideline to open up a chain of ports that Consul calls for to function. i have further a desk exhibiting each one of those ports and what they do. Consul's default ports. Port function 53/udp DNS server 8300 Server RPC 8301 + udp Serf LAN port 8302 + udp Serf WAN port 8400 RPC endpoint 8500 HTTP API you do not need to fret approximately such a lot of them for the needs of this bankruptcy. the $64000 ones for us are 53/udp that is the port Consul goes to be operating DNS on.

Inner most repositories come in a chain of scaled plans. the marina product has lately been received through CoreOS and should be built-in into that product. precis during this bankruptcy, we have seen tips to use and have interaction with Docker pictures and the fundamentals of editing, updating, and importing pictures to the Docker Hub. now we have additionally realized approximately utilizing a Dockerfile to build our personal customized photos. ultimately, we now have found tips on how to run our personal neighborhood Docker registry and a few hosted choices. this provides us the foundation for commencing to construct prone with Docker.

Download PDF sample

Rated 4.83 of 5 – based on 40 votes