SlideShare a Scribd company logo
How do we apply Docker
to Android
Docker & Android
UA Mobile | Volodymyr Bratashchuk | 6.04.2019
Content
What is Docker?
What pain does it solve?
How-to?
Demo
Q&A
What is Docker?
What is it so special about Docker?
До чого прикладати Docker в Android? - UA Mobile 2019
What is it so special
about Docker?
Common VM vs Docker: house vs appartment
Appartment:
Go isolated process + System parts + Magic
Best tasting on Linux host
Advantages:
Highly configurable to our needs
Spins up in seconds
Takes care of resources
Docker building
blocks
Dockerfile:
Commands: FROM, ADD, RUN, ENV,
Each creates a layer(like commit in Git)
docker build – builds image from Dockerfile
docker run – start process from image
docker exec – executes command inside process
docker-machine – operate with VMs like VirtualBox,
DigitalOcean, Azure, AWS
Docker Hub like Github
Application
What pain does it solve?
CI/Automated tests
How easy is it to setup machine to build Android project?
Download Android SDK
sdkmanager install dependencies
Different types of tests needs to run in parallel
UI, Espresso, Unit
Daily, pipeline, regression…
Plug-n-play
No need to install anything on your freshy CI machine
How is it better than CI services like Circle, Travis?
We don’t have money for this
We can’t give them the code
What to Dockerize?
Depends on what you need to and can do?
Connect your
device
Pros
Quick setup
Most lightweight in terms of Docker
Close to real world environment
Cons
Hey we need a dedicated device[s]
docker run -v /dev/bus/usb:/dev/bus/usb
DockerHost
Emulator inside
container
Pros
Quick setup
Container is everything we need
Cons
May take time to create/find image
thedrhax/android-avd
Pretty heavy-weight container
<nothing>
DockerHost
Docker
Emulator on the
host
Pros
May run on Mac OS host
Cons
Need to install SDK on the host
docker run -p 5555:5555 --expose 5555
docker exec adb connect host.docker.internal
Host
Into deep
Implementation details
Setup
Old good laptop with Ubuntu + Jenkins + Docker
Android app:)
With tests..?
Run Docker, run…
Don’t use OS X for CI
Design
dockerized_*.sh script
does the same as common Android .circle config
github.com/vbevans94/docker-android
Build from Dockerfile or pull from DockerHub?
Dockerfile is more flexible
pull is more correct solution and also faster
but you can have both
Show me the code
Interactive mode
До чого прикладати Docker в Android? - UA Mobile 2019

More Related Content

PDF
The Automated Container Deployment Pipeline- JAXDevOps
Kontena, Inc.
 
PPTX
20170321 docker with Visual Studio 2017
Takayoshi Tanaka
 
PDF
Docker experience @inbotapp
Jilles van Gurp
 
PDF
CD NYC From Source Code to Production
Kontena, Inc.
 
PDF
Automating Docker Containers with Puppet 2014 10-13
kylog
 
ODP
DevAssistant, Docker and You
BalaBit
 
PDF
From Zero Docker to Hackathon Winner - Marcos Lilljedahl and Jimena Tapia
Docker, Inc.
 
PDF
Bauen und Verteilen von Multi-Arch Docker Images für Linux und Windows
Stefan Scherer
 
The Automated Container Deployment Pipeline- JAXDevOps
Kontena, Inc.
 
20170321 docker with Visual Studio 2017
Takayoshi Tanaka
 
Docker experience @inbotapp
Jilles van Gurp
 
CD NYC From Source Code to Production
Kontena, Inc.
 
Automating Docker Containers with Puppet 2014 10-13
kylog
 
DevAssistant, Docker and You
BalaBit
 
From Zero Docker to Hackathon Winner - Marcos Lilljedahl and Jimena Tapia
Docker, Inc.
 
Bauen und Verteilen von Multi-Arch Docker Images für Linux und Windows
Stefan Scherer
 

What's hot (20)

PDF
Introduction to Docker
James Turnbull
 
PDF
From Fortran on the Desktop to Kubernetes in the Cloud: A Windows Migration S...
Docker, Inc.
 
PDF
Docker for Dummies
Roel Hartman
 
PDF
Run your Appium tests using Docker Android - AppiumConf 2019
Sargis Sargsyan
 
PPTX
Docker
Alireza Omidi
 
PDF
Testing as a container
Irfan Ahmad
 
PDF
Orchestrating Docker - Making the Whale Dance
James Turnbull
 
PPTX
Docker 101
Andy Melichar
 
PPTX
Developer South Coast 2018: Modernizing .NET Apps with Docker
Elton Stoneman
 
PDF
Azure Saturday - Build and Deploy multi-arch Docker Images
Stefan Scherer
 
KEY
How To Make A Framework Plugin That Does Not Suck
Max Andersen
 
PPTX
vodQA(Pune) 2018 - Visual testing of web apps in headless environment manis...
vodQA
 
PDF
Docker Tooling for Eclipse
Max Andersen
 
PPTX
Docker - A container full of Chocolatey
Stefan Scherer
 
PPTX
Accelerating the Next 10,000 Clouds by Michael Kadera, Intel
Docker, Inc.
 
PPTX
vodQA(Pune) 2018 - Docker in Testing
vodQA
 
PDF
Docker for Developers
James Turnbull
 
PDF
Demystifying Docker
Cloud Native Bangalore
 
PDF
Docker Container-Introduction and Features
Ashnikbiz
 
PPTX
How to Dockerize Angular, Vue and React Web Apps
Belatrix Software
 
Introduction to Docker
James Turnbull
 
From Fortran on the Desktop to Kubernetes in the Cloud: A Windows Migration S...
Docker, Inc.
 
Docker for Dummies
Roel Hartman
 
Run your Appium tests using Docker Android - AppiumConf 2019
Sargis Sargsyan
 
Testing as a container
Irfan Ahmad
 
Orchestrating Docker - Making the Whale Dance
James Turnbull
 
Docker 101
Andy Melichar
 
Developer South Coast 2018: Modernizing .NET Apps with Docker
Elton Stoneman
 
Azure Saturday - Build and Deploy multi-arch Docker Images
Stefan Scherer
 
How To Make A Framework Plugin That Does Not Suck
Max Andersen
 
vodQA(Pune) 2018 - Visual testing of web apps in headless environment manis...
vodQA
 
Docker Tooling for Eclipse
Max Andersen
 
Docker - A container full of Chocolatey
Stefan Scherer
 
Accelerating the Next 10,000 Clouds by Michael Kadera, Intel
Docker, Inc.
 
vodQA(Pune) 2018 - Docker in Testing
vodQA
 
Docker for Developers
James Turnbull
 
Demystifying Docker
Cloud Native Bangalore
 
Docker Container-Introduction and Features
Ashnikbiz
 
How to Dockerize Angular, Vue and React Web Apps
Belatrix Software
 
Ad

Similar to До чого прикладати Docker в Android? - UA Mobile 2019 (20)

PDF
Docker introduction in Hardware Company
Evan Lin
 
PDF
Appium Dockerization: from Scratch to Advanced Implementation - HUSTEF 2019
Sargis Sargsyan
 
PDF
containers and virtualization tools ( Docker )
Imo Inyang
 
PDF
Docker Up and Running for Web Developers
Amr Fawzy
 
PDF
Docker up and Running For Web Developers
BADR
 
PDF
Dockerize your Symfony application - Symfony Live NYC 2014
André Rømcke
 
PPTX
Dockerize the World
damovsky
 
PDF
Docker intro
Frei Zhang
 
PDF
Docker
Brian Hogan
 
PDF
Docker workshop GDSC_CSSC
GDSC UofT Mississauga
 
PPTX
Dockerize the World - presentation from Hradec Kralove
damovsky
 
PDF
Apt get no more let Vagrant, Puppet and Docker take the stage
Alessandro Cinelli (cirpo)
 
PPTX
Cohesion Techsessie Docker - Daniel Palstra
Daniel Palstra
 
PDF
Docker puebla bday #4 celebration
Ramon Morales
 
PPTX
Start your adventure with docker
Sagar Dash
 
PPTX
Docker and the Container Ecosystem
psconnolly
 
PPTX
Docker Timisoara: Dockercon19 recap slides, 23 may 2019
Radulescu Adina-Valentina
 
PDF
DOCKER-PIAIC-SLIDES
MuhammadAhmed651877
 
PPTX
Docker Starter Pack
Saeed Hajizade
 
PDF
Docker by Example - Basics
Ganesh Samarthyam
 
Docker introduction in Hardware Company
Evan Lin
 
Appium Dockerization: from Scratch to Advanced Implementation - HUSTEF 2019
Sargis Sargsyan
 
containers and virtualization tools ( Docker )
Imo Inyang
 
Docker Up and Running for Web Developers
Amr Fawzy
 
Docker up and Running For Web Developers
BADR
 
Dockerize your Symfony application - Symfony Live NYC 2014
André Rømcke
 
Dockerize the World
damovsky
 
Docker intro
Frei Zhang
 
Docker
Brian Hogan
 
Docker workshop GDSC_CSSC
GDSC UofT Mississauga
 
Dockerize the World - presentation from Hradec Kralove
damovsky
 
Apt get no more let Vagrant, Puppet and Docker take the stage
Alessandro Cinelli (cirpo)
 
Cohesion Techsessie Docker - Daniel Palstra
Daniel Palstra
 
Docker puebla bday #4 celebration
Ramon Morales
 
Start your adventure with docker
Sagar Dash
 
Docker and the Container Ecosystem
psconnolly
 
Docker Timisoara: Dockercon19 recap slides, 23 may 2019
Radulescu Adina-Valentina
 
DOCKER-PIAIC-SLIDES
MuhammadAhmed651877
 
Docker Starter Pack
Saeed Hajizade
 
Docker by Example - Basics
Ganesh Samarthyam
 
Ad

More from UA Mobile (20)

PDF
Designing iOS+Android project without using multiplatform frameworks - UA Mob...
UA Mobile
 
PDF
Декларативное программирование клиент-серверных приложений на андроид - UA Mo...
UA Mobile
 
PDF
Leave your Room behind - UA Mobile 2019
UA Mobile
 
PDF
OpenId and OAuth2: Rear, Medium, Well Done - UA Mobile 2019
UA Mobile
 
PDF
Google Wear OS watch faces and applications development - UA Mobile 2019
UA Mobile
 
PDF
Історія декількох проектів та що в них пішло не так - UA Mobile 2019
UA Mobile
 
PDF
Working effectively with ViewModels and TDD - UA Mobile 2019
UA Mobile
 
PDF
Managing State in Reactive applications - UA Mobile 2019
UA Mobile
 
PDF
Ідіоматична ін'єкція залежностей на Kotlin без фреймворків - UA Mobile2019
UA Mobile
 
PDF
Актуальні практики дизайну мобільних додатків - UA Mobile 2019
UA Mobile
 
PDF
Building your Flutter apps using Redux - UA Mobile 2019
UA Mobile
 
PDF
Optional. Tips and Tricks - UA Mobile 2019
UA Mobile
 
PDF
Designing iOS+Android project without using multiplatform frameworks - UA Mob...
UA Mobile
 
PDF
Бібліотеки та Інструменти на сторожі коду - UA Mobile 2019
UA Mobile
 
PDF
Flutter: No more boring apps! - UA Mobile 2019
UA Mobile
 
PDF
Долаючи прірву між дизайнерами та розробниками - UA Mobile 2019
UA Mobile
 
PDF
Multiplatform shared codebase with Kotlin/Native - UA Mobile 2019
UA Mobile
 
PDF
Sceneform SDK на практиці - UA Mobile 2019
UA Mobile
 
PDF
Coroutines in Kotlin. UA Mobile 2017.
UA Mobile
 
PDF
Augmented reality on Android. UA Mobile 2017.
UA Mobile
 
Designing iOS+Android project without using multiplatform frameworks - UA Mob...
UA Mobile
 
Декларативное программирование клиент-серверных приложений на андроид - UA Mo...
UA Mobile
 
Leave your Room behind - UA Mobile 2019
UA Mobile
 
OpenId and OAuth2: Rear, Medium, Well Done - UA Mobile 2019
UA Mobile
 
Google Wear OS watch faces and applications development - UA Mobile 2019
UA Mobile
 
Історія декількох проектів та що в них пішло не так - UA Mobile 2019
UA Mobile
 
Working effectively with ViewModels and TDD - UA Mobile 2019
UA Mobile
 
Managing State in Reactive applications - UA Mobile 2019
UA Mobile
 
Ідіоматична ін'єкція залежностей на Kotlin без фреймворків - UA Mobile2019
UA Mobile
 
Актуальні практики дизайну мобільних додатків - UA Mobile 2019
UA Mobile
 
Building your Flutter apps using Redux - UA Mobile 2019
UA Mobile
 
Optional. Tips and Tricks - UA Mobile 2019
UA Mobile
 
Designing iOS+Android project without using multiplatform frameworks - UA Mob...
UA Mobile
 
Бібліотеки та Інструменти на сторожі коду - UA Mobile 2019
UA Mobile
 
Flutter: No more boring apps! - UA Mobile 2019
UA Mobile
 
Долаючи прірву між дизайнерами та розробниками - UA Mobile 2019
UA Mobile
 
Multiplatform shared codebase with Kotlin/Native - UA Mobile 2019
UA Mobile
 
Sceneform SDK на практиці - UA Mobile 2019
UA Mobile
 
Coroutines in Kotlin. UA Mobile 2017.
UA Mobile
 
Augmented reality on Android. UA Mobile 2017.
UA Mobile
 

До чого прикладати Docker в Android? - UA Mobile 2019

  • 1. How do we apply Docker to Android
  • 2. Docker & Android UA Mobile | Volodymyr Bratashchuk | 6.04.2019
  • 3. Content What is Docker? What pain does it solve? How-to? Demo Q&A
  • 4. What is Docker? What is it so special about Docker?
  • 6. What is it so special about Docker? Common VM vs Docker: house vs appartment Appartment: Go isolated process + System parts + Magic Best tasting on Linux host Advantages: Highly configurable to our needs Spins up in seconds Takes care of resources
  • 7. Docker building blocks Dockerfile: Commands: FROM, ADD, RUN, ENV, Each creates a layer(like commit in Git) docker build – builds image from Dockerfile docker run – start process from image docker exec – executes command inside process docker-machine – operate with VMs like VirtualBox, DigitalOcean, Azure, AWS Docker Hub like Github
  • 9. CI/Automated tests How easy is it to setup machine to build Android project? Download Android SDK sdkmanager install dependencies Different types of tests needs to run in parallel UI, Espresso, Unit Daily, pipeline, regression… Plug-n-play No need to install anything on your freshy CI machine How is it better than CI services like Circle, Travis? We don’t have money for this We can’t give them the code
  • 10. What to Dockerize? Depends on what you need to and can do?
  • 11. Connect your device Pros Quick setup Most lightweight in terms of Docker Close to real world environment Cons Hey we need a dedicated device[s] docker run -v /dev/bus/usb:/dev/bus/usb DockerHost
  • 12. Emulator inside container Pros Quick setup Container is everything we need Cons May take time to create/find image thedrhax/android-avd Pretty heavy-weight container <nothing> DockerHost
  • 13. Docker Emulator on the host Pros May run on Mac OS host Cons Need to install SDK on the host docker run -p 5555:5555 --expose 5555 docker exec adb connect host.docker.internal Host
  • 15. Setup Old good laptop with Ubuntu + Jenkins + Docker Android app:) With tests..? Run Docker, run… Don’t use OS X for CI
  • 16. Design dockerized_*.sh script does the same as common Android .circle config github.com/vbevans94/docker-android Build from Dockerfile or pull from DockerHub? Dockerfile is more flexible pull is more correct solution and also faster but you can have both
  • 17. Show me the code Interactive mode