Skip to content

Docker and Containers: The Big Picture

These are my notes from Nigel Poulton’s course on PluralSight, “Docker and Containers: The Big Picture“. Do check out his videos, he’s an easy guy to listen to and explains the subject matter in a digestible manner. Yo can also follow him on Twitter – @nigelpoulton

What are containers?

Hypervisor

  • Takes slice of physical server resource to run OS and apps.
  • OS uses RAM, CPU & disk space just to run.
  • Licence costs for OS for each virtual server.
  • Resource and budget cost – CAPEX (Capital Expenditure) and OPEX (Operational Expenditure).
  • Requirement to manage and patch each VM.

Containers

  • One physical server, one OS then e.g. four containers hosting four apps.

Container Demo

  • Download container image.
  • Create app from image.
  • Start container, stop container.
  • Able to map port of host to port within the container.

Containers = Virtualisation 2.0

The Docker Project

  • Open Source, not owned by Docker Inc.
  • Build better, Ship better and Deploy better.
  • Docker Hub
    • Store and retrieve Docker images.
    • >240k repositories.
    • Public and Private repositories.

Preparing to Thrive

  • Get hands on with it.
  • Start making it official: CI/CD workflows.
  • Distributed apps/services – run some in containers, some  in VMs (infra services).
  • Tools: orchestrate deployments, look at logs.
  • Don’t neglect infrastructure to support containers: orchestration, clustering, management, monitoring and logging.
  • Datadog stats (datadoghq.com): companies who adopted containers tripled the number in use within six months.

What Kind of Work Will Containers Do?

  • Stateless: does not keep any changes or data, e.g. web server.
  • Stateful: keeps changes and data, e.g. database server.
  • Containers can do both.
  • Can put legacy apps in containers but missing the point – opportunity to rethink: micro services (many services combine to create one app).
  • Docker containers persist data just the same as a VM does.

Docker Hub (Container Registries)

  • Place to store and retrieve container images.
  • docker pull <image name> e.g. docker pull Mongo
    • pulls Mongo container image.
  • Registry can have one or many repositories.
  • Images can be public or private.
    • Public images can be pulled by anyone but only pushed by authorised users.
  • Can create private repositories – within corporate firewall.
  • Docker Trusted Registry (DTR).

Automated Workflow

  • App Update -> Software Repo -> Testing -> Container Registry -> Deployment -> On Premise/Cloud
Docker Automated Workflow

Docker Automated Workflow

Ready for Production & Enterprise?

  • Docker Engine available in different versions:
    • Experimental
    • Stable
    • Commercially Supported (CR)
  • Docker Swarm (clustering) is laid on top of several Docker engines.
  • Docker Content Trust

Container Orchestration

Orchestration: taking something that was manual and automating it.

  • Apps compromise multiple parts.
  • Define services/components that make up the app.
  • Define how they fit together: networking and API calls.
  • Deploy to containers.
  • Docker Machine: Provisions Docker hosts/engines.
  • Docker Compose: Compose multi-container apps.
  • Docker Swarm: Schedule containers over multiple Docker engines.
  • Tutum: Sits across Machine, Compose & Swarm providing a UI.
Advertisements

Removing objects

This is a useful feature of Photoshop.

There are two phases in removing an object from an image:

  1. The removal of the object
  2. Filling the area left by the removed object

1 – The removal of the object

  • Selecting the Rectangular Marquee tool.
  • Creating a marquee (click and drag action) around the object that is to be removed.
  • Selecting the Zoom tool
  • Zooming in on the selected content.
  • Selecting the Pen tool.
  • Selecting the Paths item on the toolbar.
  • Using the Path tool we must click at very short intervals till we surround the content to be removed. The shortest the intervals of the clicks the more detailed the outcome.
  • Clicking the box that started the selected path (first selection) when the surrounding area is complete.
  • Right-clicking in the selected area (path) to access the Make Selection dialog box.
  • Selecting Anti-Aliased that provides a smooth outline around the selected object.
  • Clicking OK in the dialog box creates a path around the object.
  • Clicking the Image -> Cut button removes the selected object.
  • Choosing the Select ( Deselect menu item removes the selection.

2 – Filling the area left by the removed object

  • Selecting the Lasso tool.
  • Creating a selection similar to the one that was removed, ensuring the selection contains elements of the image that are expected to be in the place of the removed object (e.g. background plantation). This step requires dragging with the Lasso tool.
  • Choosing the Select -> Modify -> Feather menu item.
  • Entering 5 in the radius field will help feathering to blend the photograph patch with the rest of the photograph.
  • Clicking OK to confirm the feathering
  • Clicking on the selection that is created and holding the Command key will allow to move the selection till the removed area is covered.
  • Choosing Select -> Deselect menu item to complete the move.
  • Repeating the process till the missing part of the image is filled.
  • Zoom out to view the finished results.

Further info on copying while moving from Adobe.

Black and white conversion

Black and white conversion may be required when producing black & white printed material or to provide an ageing effect.

  • Choosing the Image -> Duplicate menu item.
  • Using the Duplicate Image dialog box.
  • Entering a name for the duplicate image to be created.
  • Using the duplicate image we are ready to convert it to black and white.
  • Choose the Image -> Mode -> Grayscale menu item.
  • Discarding any colour information when prompted.

Image Cropping

Using the crop tool it is possible to remove excess pace from the image.

  • Selecting the Crop tool.
  • Highlighting (click and drag motion) the portion of the photograph that we wish to keep.
  • Adjusting the edges of the highlighted area (click and drag motion on the top, bottom, right and left of the highlighted area).
  • Adjusting the highlighted area proportionately.
  • Choosing the menu item Image -> Crop.

Evolution of Adobe Photoshop

Adobe Photoshop reached version 8 in 2003.

Then packaged with other apps in Adobe Creative Suite (CS).

CS6 is 13th full release.

Some new features added when rebranding from Photoshop to CS include:

  • smart guides
  • lens blur filter
  • match colour command
  • Macrovision copy protection (based on DRM technology)
  • scripting support for JavaScript
  • supporting 2Gb file

CS2 version included:

  • smart objects
  • image warp
  • red-eye tool
  • lens correction filter
  • high dynamic range imaging (HDRI) support

CS3 included:

  • revised user interface
  • black and white conversion adjustment
  • auto align and auto blend
  • smart filters

CS4 included:

  • adjustments panel
  • auto-blending of images
  • masks panel
  • auto-alignment of layers
  • new file management and workspaces with Adobe Bridge CS4

CS5.5 included:

  • content aware fill
  • puppet warp tool
  • mixer brush
  • automatic lens correction
  • improved selection and masking controls

 

Layers

Can hold separate elements forming a collage or separating elements of single image for manipulation.

Layer visibility can be turned on and off.

Layer opacity can be changed from 0% (transparent) to 100% (opaque).

Modes and Colours

Can use Photoshop to change mode of image i.e. how each pixel is represented.

Predominant mode is RGB. Pixels represented by varying degree of intensity of red, green & blue.

Performed via Image -> Mode.