SlideShare a Scribd company logo
Visual Studio (code) tools for docker
Alessandro Melchiori - @amelchiori
CodicePlastico
Agenda
Docker and
Docker-Compose
Docker is a very popular container platform that lets you easily package, deploy,
and consume applications and services.
With Docker, you can build images by specifying the step by step commands needed to build the image
in a Dockerfile. A Dockerfile is just a text file that contains the build instructions.
Docker
What’s a container?
Instead of configuring a machine to host your
application, you have your application wrapped
into a container and deployed on a machine that
hosts the container engine which is in charge of
actually running the containers.
The Docker extension
Docker support for VS Code is provided by an
extension.
To install the Docker extension, open the
Extensions view by pressing Ctrl+Shift+X and
search for docker to filter the results. Select the
Microsoft Docker extension.
DEMO
Create a Dockerfile
Multi-stage builds are a new feature requiring Docker 17.05 or higher on the daemon and client. Multistage
builds are useful to anyone who has struggled to optimize Dockerfiles while keeping them easy to read and
maintain.
Docker multi-stage builds
Docker multi-stage builds
> FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build-env
> WORKDIR /app
> COPY *.csproj ./
> RUN dotnet restore
> COPY . ./
> RUN dotnet publish -c Release -o out
> FROM mcr.microsoft.com/dotnet/core/aspnet:2.2
> WORKDIR /app
> COPY --from=build-env /app/out .
> ENTRYPOINT ["dotnet", "aspnetapp.dll"]
DEMO
Create a Dockerfile using vscode extension
Developing inside
a container
The Remote - Containers extension lets you use a Docker container as a full-featured development
environment. Whether you deploy to containers or not, containers make a great development environment
because you can:
● Develop with a consistent, easily reproducible toolchain on the same operating system you deploy to.
● Quickly swap between different, isolated development environments and safely make updates without
worrying about impacting your local machine.
● Make it easy for new team members / contributors to get up and running in a consistent development
environment.
● Try out new technologies or clone a copy of a code base without impacting your local setup.
Remote containers extension
Developing inside a container
Workspace files are mounted from the local file
system or copied or cloned into the container.
Extensions are installed and run inside the
container, where they have full access to the
tools, platform, and file system.
This means that you can seamlessly switch your
entire development environment just by
connecting to a different container.
Kubernetes
integration
Kubernetes is a cluster technology.
It means that you will see a cluster of computers
as one entity. You will not deploy an application
on a specific computer, but somewhere in the
cluster
What’s Kubernetes (k8s)
K8s 101 - Nodes
Each computer in the cluster is called a node.
Eventually, the nodes will host your applications.
The nodes can be spread throughout the world in
different data centers
K8s 101 - Pods
Pods are the smallest unit you will eventually
deploy to the cluster.
A single Pod can hold multiple containers.
K82 101 - Deployments
Deployments are requirements you give to
Kubernetes regarding your applications (Pods)
K8s 101 - Services
Services are an abstract way to expose an
application running on a set of Pods as a
network service.
DEMO
K8s deployment configuration
ALESSANDRO MELCHIORI
Founder & Software developer @CodicePlastico
alessandro@codiceplastico.com
@amelchiori
Grazie!

More Related Content

PPTX
GettingStartedWithDocker_docker
PPTX
Windows Containers
PPTX
8 good reasons to learn docker
PDF
Bauen und Verteilen von Multi-Arch Docker Images für Linux und Windows
PPTX
Docker presentation
PPTX
Docker with WordPress
PPTX
Docker + Jelastic - planeetta.fi
PPTX
Docker
GettingStartedWithDocker_docker
Windows Containers
8 good reasons to learn docker
Bauen und Verteilen von Multi-Arch Docker Images für Linux und Windows
Docker presentation
Docker with WordPress
Docker + Jelastic - planeetta.fi
Docker

What's hot (20)

PPTX
Quick Trip with Docker
PDF
Docker how to
PDF
Docker with Selenium by Thirumalai Vignesh
PDF
Docker 101
PPTX
Docker - A container full of Chocolatey
PPTX
Docker In Brief
PDF
Docker Container-Introduction and Features
PPTX
Docker
PDF
Azure Saturday - Build and Deploy multi-arch Docker Images
PPTX
Containerization & Docker - Under the Hood
PPTX
Docker and containerization
PDF
Docker intro
ODP
Docker for Professionals: The Practical Guide
PPTX
Craft april17
PDF
Kubernetes Vs. Docker Swarm: Comparing the Best Container Orchestration Tool ...
PPTX
Docker - fundamental
PDF
Infinit: Modern Storage Platform for Container Environments
PDF
Docker - Frank Maounis
PDF
Docker - What it is and how to get started?
Quick Trip with Docker
Docker how to
Docker with Selenium by Thirumalai Vignesh
Docker 101
Docker - A container full of Chocolatey
Docker In Brief
Docker Container-Introduction and Features
Docker
Azure Saturday - Build and Deploy multi-arch Docker Images
Containerization & Docker - Under the Hood
Docker and containerization
Docker intro
Docker for Professionals: The Practical Guide
Craft april17
Kubernetes Vs. Docker Swarm: Comparing the Best Container Orchestration Tool ...
Docker - fundamental
Infinit: Modern Storage Platform for Container Environments
Docker - Frank Maounis
Docker - What it is and how to get started?
Ad

Similar to VS Code tools for docker (20)

PPTX
20170321 docker with Visual Studio 2017
PPTX
Docker 101
PDF
Why everyone is excited about Docker (and you should too...) - Carlo Bonamic...
PDF
A curtain-raiser to the container world Docker & Kubernetes
PDF
Docker for developers on mac and windows
PPTX
Docker Timisoara: Dockercon19 recap slides, 23 may 2019
PPTX
ma-formation-en-Docker-jlklk,nknkjn.pptx
PPTX
Docker
PDF
codemotion-docker-2014
PPTX
Container on azure
PDF
Demystifying Docker
PPTX
Demystifying Docker101
PDF
Faster and Easier Software Development using Docker Platform
PDF
The Docker Ecosystem
PDF
Agile Brown Bag - Vagrant & Docker: Introduction
PPTX
Developer workflow with docker
PDF
Docker All The Things - ASP.NET 4.x and Windows Server Containers
PPTX
Docker - A curtain raiser to the Container world
PDF
Docker slides
PDF
Continuous Integration with Docker on AWS
20170321 docker with Visual Studio 2017
Docker 101
Why everyone is excited about Docker (and you should too...) - Carlo Bonamic...
A curtain-raiser to the container world Docker & Kubernetes
Docker for developers on mac and windows
Docker Timisoara: Dockercon19 recap slides, 23 may 2019
ma-formation-en-Docker-jlklk,nknkjn.pptx
Docker
codemotion-docker-2014
Container on azure
Demystifying Docker
Demystifying Docker101
Faster and Easier Software Development using Docker Platform
The Docker Ecosystem
Agile Brown Bag - Vagrant & Docker: Introduction
Developer workflow with docker
Docker All The Things - ASP.NET 4.x and Windows Server Containers
Docker - A curtain raiser to the Container world
Docker slides
Continuous Integration with Docker on AWS
Ad

More from Alessandro Melchiori (20)

PDF
C# metaprogramming with source generator.pdf
PDF
Scale your (aks) cluster, luke!
PDF
A quick introduction to AKS
PDF
Developing reliable applications with .net core and AKS
PPTX
Developing reliable applications with .net core and AKS
PDF
How to search...better! (azure search)
PDF
AKS: k8s e azure
PDF
How to search...better!
PPTX
A quick tour around Azure Dev Spaces
PPTX
Azure functions: from a function to a whole application in 60 minutes
PPTX
Aks: k8s e azure
PDF
Monitoring docker: from zero to Azure
PPTX
Cooking Akka.net and Azure Service Fabric together
PPTX
Azure data platform overview
PPTX
ACR + ACS + VSTS: a complete ALM pipeline with docker and azure
PPTX
Docker & Azure
PDF
Docker and Azure
PPTX
Come ti "pusho" il web con WebSockets: da 0 a SignalR
PPTX
Docker & azure
PPTX
Azure service fabric: a gentle introduction
C# metaprogramming with source generator.pdf
Scale your (aks) cluster, luke!
A quick introduction to AKS
Developing reliable applications with .net core and AKS
Developing reliable applications with .net core and AKS
How to search...better! (azure search)
AKS: k8s e azure
How to search...better!
A quick tour around Azure Dev Spaces
Azure functions: from a function to a whole application in 60 minutes
Aks: k8s e azure
Monitoring docker: from zero to Azure
Cooking Akka.net and Azure Service Fabric together
Azure data platform overview
ACR + ACS + VSTS: a complete ALM pipeline with docker and azure
Docker & Azure
Docker and Azure
Come ti "pusho" il web con WebSockets: da 0 a SignalR
Docker & azure
Azure service fabric: a gentle introduction

Recently uploaded (20)

PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
Cloud computing and distributed systems.
PDF
Empathic Computing: Creating Shared Understanding
PPTX
Spectroscopy.pptx food analysis technology
PDF
cuic standard and advanced reporting.pdf
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Encapsulation theory and applications.pdf
PPTX
Big Data Technologies - Introduction.pptx
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Electronic commerce courselecture one. Pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Machine learning based COVID-19 study performance prediction
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Cloud computing and distributed systems.
Empathic Computing: Creating Shared Understanding
Spectroscopy.pptx food analysis technology
cuic standard and advanced reporting.pdf
Unlocking AI with Model Context Protocol (MCP)
Network Security Unit 5.pdf for BCA BBA.
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Encapsulation theory and applications.pdf
Big Data Technologies - Introduction.pptx
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Electronic commerce courselecture one. Pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Reach Out and Touch Someone: Haptics and Empathic Computing
MYSQL Presentation for SQL database connectivity
Machine learning based COVID-19 study performance prediction
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy

VS Code tools for docker

  • 1. Visual Studio (code) tools for docker Alessandro Melchiori - @amelchiori CodicePlastico
  • 4. Docker is a very popular container platform that lets you easily package, deploy, and consume applications and services. With Docker, you can build images by specifying the step by step commands needed to build the image in a Dockerfile. A Dockerfile is just a text file that contains the build instructions. Docker
  • 5. What’s a container? Instead of configuring a machine to host your application, you have your application wrapped into a container and deployed on a machine that hosts the container engine which is in charge of actually running the containers.
  • 6. The Docker extension Docker support for VS Code is provided by an extension. To install the Docker extension, open the Extensions view by pressing Ctrl+Shift+X and search for docker to filter the results. Select the Microsoft Docker extension.
  • 8. Multi-stage builds are a new feature requiring Docker 17.05 or higher on the daemon and client. Multistage builds are useful to anyone who has struggled to optimize Dockerfiles while keeping them easy to read and maintain. Docker multi-stage builds
  • 9. Docker multi-stage builds > FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build-env > WORKDIR /app > COPY *.csproj ./ > RUN dotnet restore > COPY . ./ > RUN dotnet publish -c Release -o out > FROM mcr.microsoft.com/dotnet/core/aspnet:2.2 > WORKDIR /app > COPY --from=build-env /app/out . > ENTRYPOINT ["dotnet", "aspnetapp.dll"]
  • 10. DEMO Create a Dockerfile using vscode extension
  • 12. The Remote - Containers extension lets you use a Docker container as a full-featured development environment. Whether you deploy to containers or not, containers make a great development environment because you can: ● Develop with a consistent, easily reproducible toolchain on the same operating system you deploy to. ● Quickly swap between different, isolated development environments and safely make updates without worrying about impacting your local machine. ● Make it easy for new team members / contributors to get up and running in a consistent development environment. ● Try out new technologies or clone a copy of a code base without impacting your local setup. Remote containers extension
  • 13. Developing inside a container Workspace files are mounted from the local file system or copied or cloned into the container. Extensions are installed and run inside the container, where they have full access to the tools, platform, and file system. This means that you can seamlessly switch your entire development environment just by connecting to a different container.
  • 15. Kubernetes is a cluster technology. It means that you will see a cluster of computers as one entity. You will not deploy an application on a specific computer, but somewhere in the cluster What’s Kubernetes (k8s)
  • 16. K8s 101 - Nodes Each computer in the cluster is called a node. Eventually, the nodes will host your applications. The nodes can be spread throughout the world in different data centers
  • 17. K8s 101 - Pods Pods are the smallest unit you will eventually deploy to the cluster. A single Pod can hold multiple containers.
  • 18. K82 101 - Deployments Deployments are requirements you give to Kubernetes regarding your applications (Pods)
  • 19. K8s 101 - Services Services are an abstract way to expose an application running on a set of Pods as a network service.
  • 21. ALESSANDRO MELCHIORI Founder & Software developer @CodicePlastico alessandro@codiceplastico.com @amelchiori