Learn Docker - .NET Core, Java, Node.JS, PHP or Python: Learn Collection
By Arnaud Weil
5/5
()
About this ebook
You're a developer who knows nothing to Docker. Which is fine, except that you need to create and run your first containerized application using Docker.
Don't worry: I have you covered. I've been training hundreds of developers like you during 17 years, and converted my experience into this book. I know from experience teaching what takes more time to learn in Docker, and will spend time only where appropriate.
Plus this book is packed with exercises and samples where you run your own containers and create your own Docker images.
Read this book, and you can create and run your first containerized application using Docker within a week.
Arnaud Weil
Arnaud Weil is a born developper: when he was a kid he was controlling his electric train using an Atari ST and some self-made electronics, then as a teenager created and distributed worldwide one of the first Web browsers for some of the first pocket computers, when the Web was just beginning. In fact, he loves coding. Then came .NET and from 2001 Arnaud has been coding using ASP.NET, WPF, WinForms, Silverlight, WCF, XAML for all kind of applications from factory tools to smarphone applications to house control solutions. When not coding, he teaches fellow developers and provides consulting for development teams to reach their targets in the most efficient way. His status as a freelancer allows him to help his clients with many different projects. As things move on, Arnaud also learned to love HTML5, JavaScript and all the great tools that allow building professional software with those technologies. He puts an emphasis on writing modular, clever programs using agile methods and a bunch of automated testing. But what Arnaud enjoys most is helping other developers: that's why he teaches, speaks, and began writing books.
Read more from Arnaud Weil
Learn Kubernetes - Container orchestration using Docker: Learn Collection Rating: 4 out of 5 stars4/5Learn WPF MVVM - XAML, C# and the MVVM pattern Rating: 4 out of 5 stars4/5Learn ASP.NET Core MVC - Be Ready Next Week Using Visual Studio 2017 Rating: 5 out of 5 stars5/5Learn Kubernetes & Docker - .NET Core, Java, Node.JS, PHP or Python Rating: 0 out of 5 stars0 ratingsLearn ASP.NET MVC Rating: 4 out of 5 stars4/5Learn Microservices - ASP.NET Core and Docker Rating: 0 out of 5 stars0 ratingsLearn Meteor - Node.js and MongoDB JavaScript platform Rating: 5 out of 5 stars5/5
Related to Learn Docker - .NET Core, Java, Node.JS, PHP or Python
Related ebooks
Kubernetes Handbook: Non-Programmer's Guide to Deploy Applications with Kubernetes Rating: 4 out of 5 stars4/5Git Version Control Cookbook Rating: 4 out of 5 stars4/5Docker: A Quick-Start Beginner's Guide Rating: 4 out of 5 stars4/5Getting Started with Kubernetes - Second Edition Rating: 0 out of 5 stars0 ratingsDeveloping with Docker Rating: 5 out of 5 stars5/5DevOps. How to build pipelines with Jenkins, Docker container, AWS ECS, JDK 11, git and maven 3? Rating: 0 out of 5 stars0 ratingsExtending Docker Rating: 5 out of 5 stars5/5Native Docker Clustering with Swarm Rating: 0 out of 5 stars0 ratingsDocker Demystified: Learn How to Develop and Deploy Applications Using Docker (English Edition) Rating: 0 out of 5 stars0 ratingsNode.js High Performance Rating: 0 out of 5 stars0 ratingsDevOps and Containers Security: Security and Monitoring in Docker Containers Rating: 0 out of 5 stars0 ratingsInfrastructure as Code (IAC) Cookbook Rating: 0 out of 5 stars0 ratingsGetting Started with Terraform Rating: 5 out of 5 stars5/5Building RESTful Python Web Services Rating: 4 out of 5 stars4/5Infrastructure Automation with Terraform: Automate and Orchestrate your Infrastructure with Terraform Across AWS and Microsoft Azure Rating: 0 out of 5 stars0 ratingsMastering Kubernetes Rating: 5 out of 5 stars5/5Learning Windows Server Containers Rating: 0 out of 5 stars0 ratingsGetting Started with Docker Rating: 5 out of 5 stars5/5Learn Microservices - ASP.NET Core and Docker Rating: 0 out of 5 stars0 ratingsQuick Start Kubernetes Rating: 0 out of 5 stars0 ratingsLearning Docker Rating: 5 out of 5 stars5/5A Concise Guide to Microservices for Executive (Now for DevOps too!) Rating: 1 out of 5 stars1/5Docker Orchestration Rating: 0 out of 5 stars0 ratingsDocker: Up and Running: Build and deploy containerized web apps with Docker and Kubernetes (English Edition) Rating: 0 out of 5 stars0 ratingsThe Art of Docker: Streamline App Development and Deployment with Containerization (Computer Programming) Rating: 0 out of 5 stars0 ratings
System Administration For You
Cybersecurity: The Beginner's Guide: A comprehensive guide to getting started in cybersecurity Rating: 5 out of 5 stars5/5Linux Bible Rating: 0 out of 5 stars0 ratingsLinux Commands By Example Rating: 5 out of 5 stars5/5Ethical Hacking Rating: 4 out of 5 stars4/5CompTIA A+ Complete Review Guide: Core 1 Exam 220-1101 and Core 2 Exam 220-1102 Rating: 5 out of 5 stars5/5ServiceNow IT Operations Management Rating: 5 out of 5 stars5/5Linux: Learn in 24 Hours Rating: 5 out of 5 stars5/5Mastering PowerShell Scripting: From Basics to Expert Proficiency Rating: 0 out of 5 stars0 ratingsBash Command Line Pro Tips Rating: 5 out of 5 stars5/5Learn PowerShell in a Month of Lunches, Fourth Edition: Covers Windows, Linux, and macOS Rating: 5 out of 5 stars5/5CompTIA A+ Certification Rating: 2 out of 5 stars2/5PowerShell: A Beginner's Guide to Windows PowerShell Rating: 4 out of 5 stars4/5SSH Mastery: OpenSSH, PuTTY, Tunnels and Keys - 2nd edition: IT Mastery, #12 Rating: 0 out of 5 stars0 ratingsThe Ultimate Guide To Microsoft Excel Vba For Beginners And Seniors Rating: 0 out of 5 stars0 ratingsNetworking for System Administrators: IT Mastery, #5 Rating: 5 out of 5 stars5/5Relayd and Httpd Mastery: IT Mastery, #11 Rating: 0 out of 5 stars0 ratingsLearning Microsoft Endpoint Manager: Unified Endpoint Management with Intune and the Enterprise Mobility + Security Suite Rating: 0 out of 5 stars0 ratingsEd Mastery (Manly McManface Edition) Rating: 0 out of 5 stars0 ratingsGit Essentials Rating: 4 out of 5 stars4/5Data Acquisition from HD Vehicles Using J1939 CAN Bus Rating: 0 out of 5 stars0 ratingsCentOS System Administration Essentials Rating: 0 out of 5 stars0 ratingsIaC Mastery: Infrastructure As Code: Your All-In-One Guide To Terraform, AWS, Azure, And Kubernetes Rating: 0 out of 5 stars0 ratingsInstant Ubuntu Rating: 4 out of 5 stars4/5Linux Shell Scripting Cookbook - Third Edition Rating: 4 out of 5 stars4/5Mastering Windows PowerShell Scripting Rating: 4 out of 5 stars4/5
Reviews for Learn Docker - .NET Core, Java, Node.JS, PHP or Python
4 ratings2 reviews
- Rating: 4 out of 5 stars4/5
Apr 24, 2019
Short, essential but complete! The best point to start you journeoy in the Docker containers! After this book you are ready to go. - Rating: 5 out of 5 stars5/5
Dec 4, 2021
easy to understand wtf is docker. also recommend docker classroom online for better understading
Book preview
Learn Docker - .NET Core, Java, Node.JS, PHP or Python - Arnaud Weil
Learn Docker - .NET Core, Java, Node.JS, PHP or Python
Be ready to create and run your containerized application next week.
Arnaud Weil
© 2018 - 2020 Arnaud Weil
To Christophe Gouguenheim, for getting me to write my first book a few years ago.
To my parents, for teaching me freedom and making sure I can enjoy it.
To my wonderful family. Your love and support fueled this book.
To my readers who suggested improvements to this book, especially Doğan Kartaltepe for your ongoing and dedicated support.
Table of Contents
Introduction
What this book is not
Prerequisites
How to read this book
Tools you need
Source code
1. Why Docker?
1.1 A DevOps enabler tool
1.2 It solves dependency conflicts
1.3 It allows for easy scaling up
1.4 It allows for seamless upgrades
1.5 International commerce already uses containers
2. Get Docker up and running
2.1 Various products for various needs
2.2 Community on a developer or CI machine
2.3 Enterprise on a Server
3. Basic concepts
4. Use Docker images
4.1 Do-it-yourself: run a container
4.2 Container management commands
4.3 Do-it-yourself: post-mortem inspection
4.4 More about docker run
4.5 Running a server container
4.6 Exercise - Run a server container
4.7 Exercise solution
4.8 Using volumes
4.9 Where do images come from?
5. Create Docker images
5.1 Creating a simple image
5.2 Creating an image including files
5.3 Images are created locally
5.4 Exercise - Build an image and run it
5.5 Exercise solution
5.6 Tags matter
5.7 Parameters as environment variables
5.8 Exercise - Enable an image to be parameterized
5.9 Exercise solution
5.10 Storage
5.11 Networking
5.12 Learning more
6. Publish Docker images
6.1 Rationale for publishing
6.2 Registries
6.3 Publishing an image
6.4 Docker Hub
6.5 Run an image on another machine
6.6 Exercise - Publish an image and run a container on another machine
6.7 Exercise solution
6.8 Private registries
6.9 Size matters
7. Forget SDK installs
7.1 One tool to rule them all
7.2 Building rationally: easy CI
7.3 Multi-stage dockerfiles
8. Docker with common development profiles
8.1 .NET Core
8.2 Java
8.3 Node.JS
8.4 PHP
8.5 Python
9. More about Running containers
9.1 Restart mode
9.2 Monitoring
9.3 Reclaim your disk
9.4 Orchestration basics
Image attributions
A word from the author
The Learn collection
Introduction
What this book is not
I made my best to keep this book small, so that you can learn Docker quickly without getting lost in petty details. If you are looking for a reference book where you’ll find answers to all the questions you may have within the next 4 years of your Docker practice, you’ll find other heavy books for that.
My purpose is to swiftly provide you with the tools you need to create and run your first containerized application using Docker, then be able to look for more by yourself when needed. While some authors seem to pride themselves in having the thickest book, in this series I’m glad I achieved the thinnest possible book for my purpose. Though I tried my best to keep all of what seems necessary, based on my 16 years experience of teaching.
Prerequisites
In order for this book to meet its goals, you must have basic experience creating applications with one of the following technologies: .NET Core, Java, Node.JS, PHP or Python.
How to read this book
This book’s aim is to make you productive as quickly as possible. For this we’ll use some theory, several demonstrations, plus exercises. Exercises appear like the following:
Do it yourself: Time to grab your keyboard and code away to meet the given objectives.
In code samples, a backslash is used in order to wrap long lines. Do not type theses backslashes when you copy code from the book.
Tools you need
The only tools you’ll need to work through this book are the following:
A Windows, Linux or Mac machine that meets the specifications for Docker Engine or Docker Desktop.
A GIT client.
A text editor.
Source code
All of the source code for the demos and do-it-yourself solutions is available at https://bitbucket.org/epobb/dockerbookfiles
It can be downloaded as a ZIP file, or if you installed GIT you can simply type:
git clone https://bitbucket.org/epobb/dockerbookfiles.g\
it
1. Why Docker?
If you’re in a hurry, you can safely skip this chapter and head straight to the Get Docker up and running chapter. This Why Docker? chapter is there for those that want to know why containers should be used.
1.1 A DevOps enabler tool
Docker is an engine that runs containers, and containers as a tool allow to solve many challenges created by the growing DevOps trend.
In DevOps, the Dev and Ops teams have conflicting goals:
As an agile developer I want to frequently publish my applications so that deployment becomes a routine. The rationale behind this is that this agility makes the go to production
event a normal, frequent, completely mastered event instead of a dreaded disaster