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 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 ASP.NET Core MVC - Be Ready Next Week Using Visual Studio 2017 Rating: 5 out of 5 stars5/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/5Native Docker Clustering with Swarm Rating: 0 out of 5 stars0 ratingsInfrastructure Automation with Terraform: Automate and Orchestrate your Infrastructure with Terraform Across AWS and Microsoft Azure Rating: 0 out of 5 stars0 ratingsDocker: A Quick-Start Beginner's Guide Rating: 4 out of 5 stars4/5Getting Started with Kubernetes - Second Edition Rating: 0 out of 5 stars0 ratingsDevOps and Containers Security: Security and Monitoring in Docker Containers Rating: 0 out of 5 stars0 ratingsLearn Microservices - ASP.NET Core and Docker Rating: 0 out of 5 stars0 ratingsGetting Started with Terraform Rating: 5 out of 5 stars5/5Hands-On Microservices with Kubernetes: Build, deploy, and manage scalable microservices on Kubernetes 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 ratingsMastering Kubernetes Rating: 5 out of 5 stars5/5Extending Docker Rating: 5 out of 5 stars5/5Infrastructure as Code (IAC) Cookbook Rating: 0 out of 5 stars0 ratingsNode.js High Performance Rating: 0 out of 5 stars0 ratingsGit Version Control Cookbook Rating: 4 out of 5 stars4/5Developing with Docker Rating: 5 out of 5 stars5/5Getting Started with Docker Rating: 5 out of 5 stars5/5Docker Demystified: Learn How to Develop and Deploy Applications Using Docker (English Edition) Rating: 0 out of 5 stars0 ratingsLearning Docker Rating: 5 out of 5 stars5/5Azure for .NET Core Developers: Implementing Microsoft Azure Solutions Using .NET Core Framework Rating: 0 out of 5 stars0 ratingsBuilding RESTful Python Web Services Rating: 4 out of 5 stars4/5A Concise Guide to Microservices for Executive (Now for DevOps too!) Rating: 1 out of 5 stars1/5Quick Start Kubernetes Rating: 0 out of 5 stars0 ratingsLearning Docker - Second Edition Rating: 4 out of 5 stars4/5Learning Windows Server Containers Rating: 0 out of 5 stars0 ratings
Trending on #Booktok
Icebreaker: A Novel Rating: 4 out of 5 stars4/5It Ends with Us: A Novel Rating: 4 out of 5 stars4/5The Secret History: A Read with Jenna Pick: A Novel Rating: 4 out of 5 stars4/5Powerless Rating: 4 out of 5 stars4/5A Little Life: A Novel Rating: 4 out of 5 stars4/5Pride and Prejudice Rating: 4 out of 5 stars4/5Normal People: A Novel Rating: 4 out of 5 stars4/5The Love Hypothesis Rating: 4 out of 5 stars4/5If We Were Villains: A Novel Rating: 4 out of 5 stars4/5The Summer I Turned Pretty Rating: 4 out of 5 stars4/5Funny Story Rating: 4 out of 5 stars4/5Happy Place Rating: 4 out of 5 stars4/5Once Upon a Broken Heart Rating: 4 out of 5 stars4/5Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones Rating: 4 out of 5 stars4/5Seven Stones to Stand or Fall: A Collection of Outlander Fiction Rating: 4 out of 5 stars4/5Better Than the Movies Rating: 4 out of 5 stars4/5Fire & Blood: 300 Years Before A Game of Thrones Rating: 4 out of 5 stars4/5The 48 Laws of Power Rating: 4 out of 5 stars4/5Crime and Punishment Rating: 4 out of 5 stars4/5Beauty and the Beast Rating: 4 out of 5 stars4/5Dune Rating: 4 out of 5 stars4/5Divine Rivals: A Novel Rating: 4 out of 5 stars4/5Rich Dad Poor Dad Rating: 4 out of 5 stars4/5The Lord Of The Rings: One Volume Rating: 5 out of 5 stars5/5The Little Prince: New Translation Version Rating: 5 out of 5 stars5/5Finnegans Wake Rating: 4 out of 5 stars4/5Beach Read Rating: 4 out of 5 stars4/5Milk and Honey: 10th Anniversary Collector's Edition 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