Docker Combat Guide
$15.00
Minimum price
$25.00
Suggested price

Docker Combat Guide

The Docker Guide for Software Developers

About the Book

A 94 DIN-A4 size pages in PDF format, DRM-free, super effective for Developers in order to learn by examples how to use Docker.

Docker allows you to run identical environment in Development that in Production.

Docker allows you to work with images that are equal in all you Servers, are immutable. If one works bad, you simply kill that Container and start another, new.

Docker is also very System Administrator, DevOps and SRE oriented, as it requires a lot of Linux understanding, so if you're a Software Developer you may not know how powerful it is.

This guide is created specifically for Software Developers in Python, PHP, Java, that want to discover the power of Docker Containers with easy examples.

It covers creating Docker in workstations running:

  • Ubuntu Linux
  • Windows
  • Mac OS X

This is not an extensive guide for System Administrators, DevOps and SREs.

This is a guide for Developers that want to start using Docker super quickly, by using examples from different projects. Also explains the usage of docker-compose and the Volumes.

The guide offers source code and the link to a repository, so you can just clone the code from there.

About the Author

Carles Mateo
Carles Mateo

I’m Carles Mateo, since January 2020 working as Operations Engineer for Blizzard Entertainment in Cork, Ireland.

Previously worked as Cloud Architect and SDM for Sanmina, in Ireland and United States, where I created and I did lead a Python and C project for a Storage Manager for our 4U Cold Storage Servers 1PB and 2U SSD and 1U NVMe with NICs up to 2x100Gbps, which will restore redundancy in the RAID when a drive dies, very quickly, using ZFS and DRAID.

I helped several multinationals:

  • Volkswagen IT (gedas) where I got promoted to head of department of Reusability and Code Components and previously I lead the SEAT's Intranet project, I solved TCP/Ip transmission problems in project PortIc for Barcelona's port (EDI Transfer), I created a project to transfer warranty documents over Web and TCP/IP instead of X.25 expensive lines, and worked for CaixaBank (formerly "la caixa") creating a Documentum solution programing the GUI and DLL's.
  • Winterthur Insurance (Axa) where I lead the project to deploy a new Contact Center Software, the e-Commerce web platform and the insurance of health policies (special Data treatment)
  • BBVA Tickets where I was responsible of the platform (Sun Solaris and Oracle)

and several CSP and ISP, Start ups, e-Commerces, Online travel agencies, eCommerce…. as CTO or in hands on positions leading teams and coding myself, in Software Development, SRE and Operation roles.

I was one of the 5 Senior BackEnds that wrote Privalia's new website, from the scratch, with inheritance, and lead a KPI Dashboards for CEO, really learning the internals of all the areas of the company through the data.

The last company I was CTO for, in Barcelona, was sold to airbnb for 45 million euros.

My friends say that everything I touch turns into gold, and my very good friend Jaume (R.I.P.) used to say that I was the most brutal technical guy, solving all the difficult technical issues easily, that he ever met. I've very grateful thoughts and memories for all the people that did speak up how well they considered me, and that were fair Other people tried to take advantage byo never telling me how good and helpful I was so they could pay me less. What they didn't know is that I always had offers paying me double, and I was choosing to help them.

Now I only accept fair agreements. I know my value.

I started programming when I was 5 years old, at 10 I won a contest at Spanish State level, getting a Pc with a green phosphorescent monitor and a floppy drive, and I've lived the times of the BBS, much before Internet.

I've coded many Freeware Software, and Open Source Software, and I created the first system in Europe to sell Tickets for musical events, in 1995, for Tick Tack Ticket. I created this e-Commerce engine, with render template system completely in C, cgi-bin, HTML.

I love Software and Hardware.

I've worked with C, Java, PHP, Python... and my knowledge of PHP Unit Testing really reached its best when I was working for a bank.

I've invented the CSort algorithm.

In my free time I teach some students to get pro in coding. Most of my time now I work with Python 3, Docker Containers and Linux.

You can find information about me in my blog.

https://blog.carlesmateo.com/bio

Table of Contents

  • Table of Contents
  • Index..................................................2
  • Dedication...............................................4
  • Contact me...............................................5
  • Receiving Free Updates.........................................5
  • If you’re not satisfied..........................................5
  • Conventions...............................................6
  • Creating our first Container.......................................7
  • Our first Dockerfile.........................................7
  • Running our first Container based in a Dockerfile.........................7
  • docker ps -a.............................................8
  • Running a Container that does something and exits...........................8
  • Naming the images with -t......................................9
  • docker images.............................................9
  • Running a container by its name...................................11
  • Have a cheap Ubuntu in your Windows or Mac with Docker.....................12
  • docker ps...............................................17
  • A small Python + MySql + Docker program as a sample.......................18
  • Installing the MySql driver.....................................19
  • Dockerfile.............................................20
  • build_docker.sh...........................................21
  • docker_run.sh............................................21
  • docker_run_mysql.sh........................................22
  • start.sql................................................23
  • select_values_example.py......................................24
  • Executing the Container.......................................24
  • Entering the Container and running the code...........................26
  • Tying together MySQL and a Python Menu with Object Oriented Programming.........26
  • MySQL Library..........................................27
  • A Data Object: CarDO........................................28
  • Queue Manager...........................................30
  • Bonus................................................36
  • A Dockerfile with PHP, Apache and Catalonia Frameworks......................37
  • End of life of images.........................................38
  • Create the Dockerfile........................................38
  • The www.cataloniaframework.com.conf file...........................41
  • Stopping, starting the docker Service and creating the Catalonia image.............42
  • Building with --no-cache option...................................42
  • Trying the Container working...................................43
  • A base Dockerfile for your Jenkins deployments............................45
  • The EXPOSE instruction......................................48
  • Build the Container.........................................48
  • Run the Container displaying the password.............................48
  • Mapping the ports with -p.....................................49
  • Configure Jenkins with Projects and Pipelines...........................52
  • Why I propose you to use Python 3.8, at least, for your Internal Automation Tools in Docker
  • Containers and Ubuntu LTS......................................53
  • Reliability and Maturity......................................53
  • A sample Star Wars Python 3 Flask Applications...........................55
  • MT Notation.............................................60
  • The Dockerfile for flask......................................60
  • Installing PIP3 Requirements with pip3 install -r requirements.txt.................61
  • Defining Environment Variables in the Container with ENV....................61
  • File requirements.txt.........................................62
  • build_docker.sh...........................................62
  • Refreshing settings in a Docker immutable image with Python and Flask...............63
  • Smaller Images...........................................66
  • Using Docker for Unit Testing....................................67
  • Using Docker for running a demo...................................67
  • Making a Container start automatically................................69
  • Docker compose............................................70
  • Docker-compose with LAMP and PHPMyAdmin..........................76
  • Volumes..............................................79
  • Exporting and Importing Docker Images................................80
  • Troubleshooting.............................................81
  • Troubleshooting a failing Docker Container.............................81
  • Solving the problem when running an Alpine Docker Container: standard_init_linux.go:190: exec
  • user process caused “no such file or directory”............................81

The Leanpub 45-day 100% Happiness Guarantee

Within 45 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

See full terms

Do Well. Do Good.

Authors have earned$10,894,929writing, publishing and selling on Leanpub, earning 80% royalties while saving up to 25 million pounds of CO2 and up to 46,000 trees.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers), EPUB (for phones and tablets) and MOBI (for Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF, EPUB and/or MOBI files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub