SlideShare a Scribd company logo
Dockerizing
Pharo
Develop & Deploy Pharo with Docker
111th #st_study @ Tokyo
2018 Masashi Umezawa
SoftUmeYa, LLC
Docker?
● Container-based virtualization platform
○ Lightweight
○ Programmable
○ Sharable
■ https://hub.docker.com/
● Docker container is like Smalltalk image
○ Universal
○ Self-contained
● With Docker, you can develop/deploy Pharo
applications more easily
Dockerizing pharo
pharo-vnc-supervisor
● pharo-vnc-supervisor
○ Supports Pharo 5, 6 & 7
○ Debuggable via VNC and Web Browser
○ Daemonized with supervisord
○ Web browser installed (Chromium, Firefox)
○ Inspired by SORABITO in-house Pharo docker image
○ Easily customizable
● teapot-pharo-vnc-supervisor
○ Example of pharo-vnc-supervisor customization
○ Runs Teapot on startup
Run a container
● Run Pharo with VNC ports opened
docker run --name my_pharo -d -p 5901:5901 -p 6901:6901
mumez/pharo-vnc-supervisor
● VNC Client
○ yourhost:5901
● Web Browser
○ http://yourhost:6901/?password=vncpassword
○ For Pharo 7, specify pharo70 tag mumez/pharo-vnc-
supervisor:pharo70
Build a customized Pharo image
● Use save-pharo <command> <args>
docker run --rm -p 5901:5901 -p 6901:6901 ¥
-v=$HOME/teapot:/root/data ¥
mumez/pharo-vnc-supervisor ¥
save-pharo get Teapot
○ You can save Pharo image on a mounted volume
○ Pharo image will be built by a temporary container
○ Teapot installed image will be saved in $HOME/teapot
and can be used later
save-pharo options
● get <Project name>
○ Install a project on Catalog Browser
● config <URL> <Configuration name> --
install=<version>
○ Install via ConfigurationOfXXX
● metacello <metacello arguments>
○ Install via BaseLineOfXXX
○ Only available on Pharo 7 based container
Run with a customized Pharo image
● Just mount an exsiting volume with -v option
docker run -p 5901:5901 -p 6901:6901 ¥
-v=$HOME/teapot:/root/data ¥
mumez/pharo-vnc-supervisor
○ Pharo image can be persisted as usual
○ Use -e PHARO_IMAGE=<image_file_name>
to specify Pharo image name
How to build your Docker image
● Prepare a Dockerfile (example: teapot-pharo-vnc-supervisor)
FROM mumez/pharo-vnc-supervisor
LABEL maintainer="Masashi Umezawa <ume@softumeya.com>"
ARG TEAPOT_DIR=/root/teapot
RUN setup.sh && ¥
save-pharo.sh get Teapot && ¥
cp -r /root/data ${TEAPOT_DIR}
ENV PHARO_HOME=${TEAPOT_DIR}
VOLUME [ "${TEAPOT_DIR}" ]
Define a new pharo image root
Copy the saved image to a new
root
Install libs / apps by save-pharo.sh
Set PHARO_HOME to the new root
Customizing startup scripts
● If you add xxx.st to $PHARO_HOME/config, it will be
called on Pharo startup
ADD ./config/startup.st ${PHARO_HOME}/config/
● In teapot-pharo-vnc-supervisor startup.st:
teapot := Teapot configure: {#port -> 9000}.
teapot
GET: '/cat/<a>/<b>' -> [:req | (req at: #a) , ' is ' , (req at: #b)];
start.
Auto-build your Docker image
● Publish your Dockerfile (and st sources) to GitHub
● Register the repository as a “automated build” in
DockerHub
● If you commit something, a new image will be built
Summing up
● “pharo-vnc-supervisor” provides a handy environment for
web application development with Pharo
● By “save-pharo” command, you can build a new Pharo
image by command line
● A new Docker image having a customized Pharo image
can be easily created with a simple Dockerfile
● Enjoy Dockernzing Pharo!

More Related Content

PDF
Plone and docker
PDF
Docker and plone
PPTX
Using vagrant
PPTX
Docker & Kubernetes
PDF
Python - Flask - miniapp - ignite
PPTX
Introduction to Docker
PPTX
Docker - Build, Ship, and Run Any App, Anywhere
PDF
Develop and deploy haskell with docker
Plone and docker
Docker and plone
Using vagrant
Docker & Kubernetes
Python - Flask - miniapp - ignite
Introduction to Docker
Docker - Build, Ship, and Run Any App, Anywhere
Develop and deploy haskell with docker

What's hot (19)

PDF
JavaCro'15 - Conquer the Internet of Things with Java and Docker - Johan Jans...
PDF
2015 DockerCon Using Docker in production at bity.com
PDF
5 min docker
PPTX
Docker Ecosystem: Part V - Docker Registry
PPTX
Docker Ecosystem: Part III - Machine
DOCX
Dockerfish-Tutorial
PPTX
How To Run Nginx in a Docker Container on Ubuntu 16.04
PDF
Deis, a PaaS built with Docker, Docker Meetup Sao Paulo #3 @Wayra
PPTX
Webapp using docker container
PDF
Hybrid (Windows + Linux) Apps with Docker Swarm
PDF
Docker & FieldAware
PDF
Getting instantly up and running with Docker and Symfony
PPTX
Gebruik dezelfde Docker container voor Java applicaties tijdens ontwikkelen e...
PDF
Docker Presentation
PDF
Teamtalk - Cluster Computing Library for Pharo Smalltalk
PDF
More than Applications: (Ab)using Docker to Improve the Portability of Everyt...
PPTX
Introduction to docker
PDF
Dockerize everything TopConf Tallinn
PPT
Edup wifi for raspberry zero
JavaCro'15 - Conquer the Internet of Things with Java and Docker - Johan Jans...
2015 DockerCon Using Docker in production at bity.com
5 min docker
Docker Ecosystem: Part V - Docker Registry
Docker Ecosystem: Part III - Machine
Dockerfish-Tutorial
How To Run Nginx in a Docker Container on Ubuntu 16.04
Deis, a PaaS built with Docker, Docker Meetup Sao Paulo #3 @Wayra
Webapp using docker container
Hybrid (Windows + Linux) Apps with Docker Swarm
Docker & FieldAware
Getting instantly up and running with Docker and Symfony
Gebruik dezelfde Docker container voor Java applicaties tijdens ontwikkelen e...
Docker Presentation
Teamtalk - Cluster Computing Library for Pharo Smalltalk
More than Applications: (Ab)using Docker to Improve the Portability of Everyt...
Introduction to docker
Dockerize everything TopConf Tallinn
Edup wifi for raspberry zero
Ad

Similar to Dockerizing pharo (20)

PDF
Docker and Pharo at ZWEIDENKER
PDF
Docker and Pharo @ZWEIDENKER
PDF
Docker presentasjon java bin
PDF
Pharo GitLab Example: This is a simple Pharo Smalltalk pipeline example
PDF
Building and deploying a distributed application with Docker, Mesos and Marathon
PDF
手把手帶你學Docker 03042017
PDF
Dockers & kubernetes detailed - Beginners to Geek
PDF
Using Docker in the Real World
PDF
Patterns and antipatterns in Docker image lifecycle as was presented at Scale...
PDF
Be a happier developer with Docker: Tricks of the trade
PDF
Deploying containers and managing them on multiple Docker hosts, Docker Meetu...
PDF
Perspectives on Docker
PDF
PDF
手把手帶你學 Docker 入門篇
PDF
Docker workshop 0507 Taichung
PPTX
Docker - Dicas ninjas - MolaTech Talks
PDF
時代在變 Docker 要會:台北 Docker 一日入門篇
PPTX
Docker Container Lifecycles, Problem or Opportunity? by Baruch Sadogursky, JFrog
PPTX
Patterns & Antipatterns in Docker Image Lifecycle
PPTX
Docker
Docker and Pharo at ZWEIDENKER
Docker and Pharo @ZWEIDENKER
Docker presentasjon java bin
Pharo GitLab Example: This is a simple Pharo Smalltalk pipeline example
Building and deploying a distributed application with Docker, Mesos and Marathon
手把手帶你學Docker 03042017
Dockers & kubernetes detailed - Beginners to Geek
Using Docker in the Real World
Patterns and antipatterns in Docker image lifecycle as was presented at Scale...
Be a happier developer with Docker: Tricks of the trade
Deploying containers and managing them on multiple Docker hosts, Docker Meetu...
Perspectives on Docker
手把手帶你學 Docker 入門篇
Docker workshop 0507 Taichung
Docker - Dicas ninjas - MolaTech Talks
時代在變 Docker 要會:台北 Docker 一日入門篇
Docker Container Lifecycles, Problem or Opportunity? by Baruch Sadogursky, JFrog
Patterns & Antipatterns in Docker Image Lifecycle
Docker
Ad

More from Masashi Umezawa (20)

PDF
第142回Smalltalk勉強会 - PharoJSで作るWebアプリケーション
PDF
FileManで楽々ファイル操作
PDF
TruffleSqueakの紹介
PDF
SmalltalkBoltでUFFI入門
PDF
TaskItの紹介
PDF
Smalltalk勉強会 - 過去、現在、そして未来へ のその後
PPTX
Revealing ALLSTOCKER
PDF
TarandocでJSONを永続化
PDF
今からでも遅くないSmalltalk入門
PDF
Tarantubeでメッセージキューを使い倒す
PDF
VerStixの紹介
PDF
Oldtalk - あのころの処理系は今
PDF
Pyonkeeを鳴らす
PDF
Smalltalk勉強会 - 過去、現在、そして未来へ
PDF
Tarantalk
PDF
Smalltalkと型について
PDF
Introduction of Pharo 5.0
PDF
Why!? Smalltalk
PDF
Pillarの紹介
PPT
Scrumの紹介とXPプロジェクトへの適用(Scrum and XP)
第142回Smalltalk勉強会 - PharoJSで作るWebアプリケーション
FileManで楽々ファイル操作
TruffleSqueakの紹介
SmalltalkBoltでUFFI入門
TaskItの紹介
Smalltalk勉強会 - 過去、現在、そして未来へ のその後
Revealing ALLSTOCKER
TarandocでJSONを永続化
今からでも遅くないSmalltalk入門
Tarantubeでメッセージキューを使い倒す
VerStixの紹介
Oldtalk - あのころの処理系は今
Pyonkeeを鳴らす
Smalltalk勉強会 - 過去、現在、そして未来へ
Tarantalk
Smalltalkと型について
Introduction of Pharo 5.0
Why!? Smalltalk
Pillarの紹介
Scrumの紹介とXPプロジェクトへの適用(Scrum and XP)

Recently uploaded (20)

PDF
Digital Strategies for Manufacturing Companies
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PPTX
ISO 45001 Occupational Health and Safety Management System
PPTX
Introduction to Artificial Intelligence
PDF
medical staffing services at VALiNTRY
PDF
How Creative Agencies Leverage Project Management Software.pdf
PPTX
ai tools demonstartion for schools and inter college
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PPTX
Odoo POS Development Services by CandidRoot Solutions
PPTX
CHAPTER 2 - PM Management and IT Context
PDF
Softaken Excel to vCard Converter Software.pdf
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
AI in Product Development-omnex systems
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
Design an Analysis of Algorithms II-SECS-1021-03
Digital Strategies for Manufacturing Companies
How to Choose the Right IT Partner for Your Business in Malaysia
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
ISO 45001 Occupational Health and Safety Management System
Introduction to Artificial Intelligence
medical staffing services at VALiNTRY
How Creative Agencies Leverage Project Management Software.pdf
ai tools demonstartion for schools and inter college
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
Odoo POS Development Services by CandidRoot Solutions
CHAPTER 2 - PM Management and IT Context
Softaken Excel to vCard Converter Software.pdf
Wondershare Filmora 15 Crack With Activation Key [2025
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
AI in Product Development-omnex systems
Operating system designcfffgfgggggggvggggggggg
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Design an Analysis of Algorithms II-SECS-1021-03

Dockerizing pharo

  • 1. Dockerizing Pharo Develop & Deploy Pharo with Docker 111th #st_study @ Tokyo 2018 Masashi Umezawa SoftUmeYa, LLC
  • 2. Docker? ● Container-based virtualization platform ○ Lightweight ○ Programmable ○ Sharable ■ https://hub.docker.com/ ● Docker container is like Smalltalk image ○ Universal ○ Self-contained ● With Docker, you can develop/deploy Pharo applications more easily
  • 4. pharo-vnc-supervisor ● pharo-vnc-supervisor ○ Supports Pharo 5, 6 & 7 ○ Debuggable via VNC and Web Browser ○ Daemonized with supervisord ○ Web browser installed (Chromium, Firefox) ○ Inspired by SORABITO in-house Pharo docker image ○ Easily customizable ● teapot-pharo-vnc-supervisor ○ Example of pharo-vnc-supervisor customization ○ Runs Teapot on startup
  • 5. Run a container ● Run Pharo with VNC ports opened docker run --name my_pharo -d -p 5901:5901 -p 6901:6901 mumez/pharo-vnc-supervisor ● VNC Client ○ yourhost:5901 ● Web Browser ○ http://yourhost:6901/?password=vncpassword ○ For Pharo 7, specify pharo70 tag mumez/pharo-vnc- supervisor:pharo70
  • 6. Build a customized Pharo image ● Use save-pharo <command> <args> docker run --rm -p 5901:5901 -p 6901:6901 ¥ -v=$HOME/teapot:/root/data ¥ mumez/pharo-vnc-supervisor ¥ save-pharo get Teapot ○ You can save Pharo image on a mounted volume ○ Pharo image will be built by a temporary container ○ Teapot installed image will be saved in $HOME/teapot and can be used later
  • 7. save-pharo options ● get <Project name> ○ Install a project on Catalog Browser ● config <URL> <Configuration name> -- install=<version> ○ Install via ConfigurationOfXXX ● metacello <metacello arguments> ○ Install via BaseLineOfXXX ○ Only available on Pharo 7 based container
  • 8. Run with a customized Pharo image ● Just mount an exsiting volume with -v option docker run -p 5901:5901 -p 6901:6901 ¥ -v=$HOME/teapot:/root/data ¥ mumez/pharo-vnc-supervisor ○ Pharo image can be persisted as usual ○ Use -e PHARO_IMAGE=<image_file_name> to specify Pharo image name
  • 9. How to build your Docker image ● Prepare a Dockerfile (example: teapot-pharo-vnc-supervisor) FROM mumez/pharo-vnc-supervisor LABEL maintainer="Masashi Umezawa <ume@softumeya.com>" ARG TEAPOT_DIR=/root/teapot RUN setup.sh && ¥ save-pharo.sh get Teapot && ¥ cp -r /root/data ${TEAPOT_DIR} ENV PHARO_HOME=${TEAPOT_DIR} VOLUME [ "${TEAPOT_DIR}" ] Define a new pharo image root Copy the saved image to a new root Install libs / apps by save-pharo.sh Set PHARO_HOME to the new root
  • 10. Customizing startup scripts ● If you add xxx.st to $PHARO_HOME/config, it will be called on Pharo startup ADD ./config/startup.st ${PHARO_HOME}/config/ ● In teapot-pharo-vnc-supervisor startup.st: teapot := Teapot configure: {#port -> 9000}. teapot GET: '/cat/<a>/<b>' -> [:req | (req at: #a) , ' is ' , (req at: #b)]; start.
  • 11. Auto-build your Docker image ● Publish your Dockerfile (and st sources) to GitHub ● Register the repository as a “automated build” in DockerHub ● If you commit something, a new image will be built
  • 12. Summing up ● “pharo-vnc-supervisor” provides a handy environment for web application development with Pharo ● By “save-pharo” command, you can build a new Pharo image by command line ● A new Docker image having a customized Pharo image can be easily created with a simple Dockerfile ● Enjoy Dockernzing Pharo!