SlideShare a Scribd company logo
Intro to Codespaces
Code anywhere with no local setup!!
Dina Esmaeili
Our journey here
A quick demo of what we get
Virtual Machine, Container, Basic Docker info, and dev container
What is codespaces & practices including creating a rails/mariadb
application on it
A quick demo of what
we get
VM vs Container
What is a VM
An emulation of a computer system that runs on another computer or host system
Hardware (CPU, RAM, Network adapter ….)
Regular OS (Linux, Windows, macOS …)
OR
Lightweight OS (Hypervisor)
Windows
VM
Ubuntu
VM
FreeBSD
VM
What is a container
A container is a standard unit of software that packages up code and all its dependencies
Computer (CPU, RAM, Network adapter ….)
Host Operating System (Debian)
OS Kernel
Host Operating
System’s
Application Layer
With Node 13
Container 1
Ubuntu
Application Layer
With Node 14
Container 2
Alpine
Application Layer
With Node 19
Container Image VS Container
Image
A Blueprint of the container
Examples:
1. ubuntu:20.04
2. alpine:3.14
3. node:19-alpine3.16
4. ruby:3.2.0-bullseye
Container
An instance from the image
Examples:
An instance of Ubuntu 20.04 that we can run
bash commands on it
How to create and manage container
Where to find docker images
Some Docker Commands
docker pull mariadb # pull mariadb image
# Run/Create a container
docker run --name mymariadb -e MYSQL_ROOT_PASSWORD=mariadb -v /mariadb/data:/var/lib/mysql -p 3306:3306 -d mariadb
docker exec -it <container_name> bash # interact with the container
docker images # list all images
docker ps -a # list all containers
Create your own docker image
I asked ChatGPT to create this
Where to ask
questions?
Docker Compose
To run one container
Create a file called “docker-compose.yml”
Then run this in terminal “docker-compose up -d”
Change it, as the `secret`
word might be black listed
To run multiple containers
Dev Container
Container 1
Ubuntu + Ruby + Node
Container 2
RDBMS (Mysql)
Container 3
Redis
Connected to remotely to
source: https://code.visualstudio.com/docs/devcontainers/containers
What is a codespace
Dev Container
Ubuntu + Ruby + Node
Container 2
RDBMS (Mysql)
Connected to remotely to
Remote Virtual Machine
Codespaces’default
dev container
Docker in Docker
Container
Host
Docker Daemon Docker Cli
Docker Cli
If you run a docker command here,
it’s executed on the host,
port forwarding and everything,
will be set in the host
Practice 1
Docker compose on codespcases
Running mysql and phpmyadmin using docker
https://github.com/the-dina/docker-demo
Practice 2
Creating a Rails/Mariadb from scratch
Creating a Rails/Mariadb from scratch
https://github.com/the-dina/rails-mysql-codespaces
Alternatives
Some alternative solutions
1. https://www.gitpod.io/pricing
2. https://www.jetbrains.com/space/
3. https://docs.docker.com/desktop/dev-environments/
4. https://codesandbox.io/docs/tutorial/getting-started-with-docker
Thanks to
Olivier Brisse
Head of infrastructure at Rangeme
Richard Campbell
https://www.youtube.com/watch?v=twMM9NQXRaI
ChatGPT
The one that eventually will make unemployed
Some youtube playlists for more
1. Introduction To Codespaces
https://www.youtube.com/watch?v=ozuDPmcC1io&list=PLmsFUfdnGr3wTl-NCblzcrEv2lFSX975-
2. Beginner's Series to: Dev Containers
https://www.youtube.com/watch?v=61M2takIKl8&list=PLj6YeMhvp2S5G_X6ZyMc8gfXPMFPg3O3
1
3. Docker
https://www.youtube.com/watch?v=31ieHmcTUOk&list=PL4cUxeGkcC9hxjeEtdHFNYMtCpjNBm
3h7
Recorded video
https://www.youtube.com/watch?v=G_hKdCcwH_Q
Goodbye
Take care!

More Related Content

Similar to Introduction to Codespaces

Similar to Introduction to Codespaces (20)

Docker navjot kaur
Docker navjot kaurDocker navjot kaur
Docker navjot kaur
 
Dockers & kubernetes detailed - Beginners to Geek
Dockers & kubernetes detailed - Beginners to GeekDockers & kubernetes detailed - Beginners to Geek
Dockers & kubernetes detailed - Beginners to Geek
 
Accelerate your development with Docker
Accelerate your development with DockerAccelerate your development with Docker
Accelerate your development with Docker
 
Accelerate your software development with Docker
Accelerate your software development with DockerAccelerate your software development with Docker
Accelerate your software development with Docker
 
Docker intro
Docker introDocker intro
Docker intro
 
Docker for mere mortals
Docker for mere mortalsDocker for mere mortals
Docker for mere mortals
 
[Codelab 2017] Docker 기초 및 활용 방안
[Codelab 2017] Docker 기초 및 활용 방안[Codelab 2017] Docker 기초 및 활용 방안
[Codelab 2017] Docker 기초 및 활용 방안
 
Dockerizing a Symfony2 application
Dockerizing a Symfony2 applicationDockerizing a Symfony2 application
Dockerizing a Symfony2 application
 
Setup docker on existing application
Setup docker on existing applicationSetup docker on existing application
Setup docker on existing application
 
Docker - A Ruby Introduction
Docker - A Ruby IntroductionDocker - A Ruby Introduction
Docker - A Ruby Introduction
 
Primi passi con Docker - ItalianCoders - 12-01-2021
Primi passi con Docker - ItalianCoders - 12-01-2021Primi passi con Docker - ItalianCoders - 12-01-2021
Primi passi con Docker - ItalianCoders - 12-01-2021
 
Introduction To Docker
Introduction To  DockerIntroduction To  Docker
Introduction To Docker
 
containers and virtualization tools ( Docker )
containers and virtualization tools ( Docker )containers and virtualization tools ( Docker )
containers and virtualization tools ( Docker )
 
Docker containers on Windows
Docker containers on WindowsDocker containers on Windows
Docker containers on Windows
 
Introduction to Docker - Learning containerization XP conference 2016
Introduction to Docker - Learning containerization  XP conference 2016Introduction to Docker - Learning containerization  XP conference 2016
Introduction to Docker - Learning containerization XP conference 2016
 
Docker for a .NET web developer
Docker for a .NET web developerDocker for a .NET web developer
Docker for a .NET web developer
 
Develop with docker 2014 aug
Develop with docker 2014 augDevelop with docker 2014 aug
Develop with docker 2014 aug
 
Domino on docker version 2
Domino on docker version 2Domino on docker version 2
Domino on docker version 2
 
Docker for Web Developers: A Sneak Peek
Docker for Web Developers: A Sneak PeekDocker for Web Developers: A Sneak Peek
Docker for Web Developers: A Sneak Peek
 
Docker at CrowdTwist
Docker at CrowdTwistDocker at CrowdTwist
Docker at CrowdTwist
 

Recently uploaded

JustNaik Solution Deck (stage bus sector)
JustNaik Solution Deck (stage bus sector)JustNaik Solution Deck (stage bus sector)
JustNaik Solution Deck (stage bus sector)
Max Lee
 

Recently uploaded (20)

Implementing KPIs and Right Metrics for Agile Delivery Teams.pdf
Implementing KPIs and Right Metrics for Agile Delivery Teams.pdfImplementing KPIs and Right Metrics for Agile Delivery Teams.pdf
Implementing KPIs and Right Metrics for Agile Delivery Teams.pdf
 
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
 
A Guideline to Gorgias to to Re:amaze Data Migration
A Guideline to Gorgias to to Re:amaze Data MigrationA Guideline to Gorgias to to Re:amaze Data Migration
A Guideline to Gorgias to to Re:amaze Data Migration
 
De mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FMEDe mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FME
 
Studiovity film pre-production and screenwriting software
Studiovity film pre-production and screenwriting softwareStudiovity film pre-production and screenwriting software
Studiovity film pre-production and screenwriting software
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
 
AI/ML Infra Meetup | ML explainability in Michelangelo
AI/ML Infra Meetup | ML explainability in MichelangeloAI/ML Infra Meetup | ML explainability in Michelangelo
AI/ML Infra Meetup | ML explainability in Michelangelo
 
KLARNA - Language Models and Knowledge Graphs: A Systems Approach
KLARNA -  Language Models and Knowledge Graphs: A Systems ApproachKLARNA -  Language Models and Knowledge Graphs: A Systems Approach
KLARNA - Language Models and Knowledge Graphs: A Systems Approach
 
How To Build a Successful SaaS Design.pdf
How To Build a Successful SaaS Design.pdfHow To Build a Successful SaaS Design.pdf
How To Build a Successful SaaS Design.pdf
 
JustNaik Solution Deck (stage bus sector)
JustNaik Solution Deck (stage bus sector)JustNaik Solution Deck (stage bus sector)
JustNaik Solution Deck (stage bus sector)
 
A Guideline to Zendesk to Re:amaze Data Migration
A Guideline to Zendesk to Re:amaze Data MigrationA Guideline to Zendesk to Re:amaze Data Migration
A Guideline to Zendesk to Re:amaze Data Migration
 
Secure Software Ecosystem Teqnation 2024
Secure Software Ecosystem Teqnation 2024Secure Software Ecosystem Teqnation 2024
Secure Software Ecosystem Teqnation 2024
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
Breaking the Code : A Guide to WhatsApp Business API.pdf
Breaking the Code : A Guide to WhatsApp Business API.pdfBreaking the Code : A Guide to WhatsApp Business API.pdf
Breaking the Code : A Guide to WhatsApp Business API.pdf
 
Benefits of Employee Monitoring Software
Benefits of  Employee Monitoring SoftwareBenefits of  Employee Monitoring Software
Benefits of Employee Monitoring Software
 
GraphAware - Transforming policing with graph-based intelligence analysis
GraphAware - Transforming policing with graph-based intelligence analysisGraphAware - Transforming policing with graph-based intelligence analysis
GraphAware - Transforming policing with graph-based intelligence analysis
 
StrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi
StrimziCon 2024 - Transition to Apache Kafka on Kubernetes with StrimziStrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi
StrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
 

Introduction to Codespaces