SlideShare a Scribd company logo
Docker
Docker Background
What is docker?
Package Software into Standardized Units for Development, Shipment and
Deployment.
What is container?
container is a standard unit of software that packages up code and all its
dependencies so the application runs quickly and reliably from one computing
environment to another.
What is docker image?
The basic copy of the container.
The “CD” disk that install the container.
Docker & Container
Docker is managing the container(s).
Old World vs New World
Docker How did we implement it?
Installation Guide
https://docs.bill.run/en/installation/docker
BillRun Docker 3 Containers
Application
PHP-FPM
PHP-CLI
Web-service
Nginx
Database
MongoDB
BillRun Docker
● Running on your native development repository
○ mapping host directory to container directory /billrun/
● Support:
○ PHP 7.4 with MongoDB 4.2; or
○ PHP 8.0 with MongoDB 4.4
BillRun Docker
● BillRun env is container (instead of dev)
○ BillRun conf is conf/container.ini
● Xdebug is working
○ port 9090 for PHP 7.4
○ port 9091 for PHP 8.0
● Can run native CLI command
● DB name is billing_container
Your host
~/projects/billrun
BillRun Directories Mapping
/billrun/
Application
PHP-FPM
PHP-CLI
/billrun/
Web-service
Nginx
/billrun/
Database
MongoDB
RO
RO
Docker Let’s get our hands dirty
Docker sample command
docker run --restart unless-stopped -d -p 3000:3000 -e MUID=$MUID 
-e MGID=$MGID -e "MB_DB_TYPE=mysql" -e "MB_DB_DBNAME=metabase" 
-e "MB_DB_PORT=3306" -e "MB_DB_USER=metabase_user" 
-e "MB_DB_PASS=12345678" -e "MB_DB_HOST=127.0.0.1" 
-e "JAVA_TIMEZONE=Asia/Jerusalem" -e "JAVA_TOOL_OPTIONS=-Xmx2g" 
--name metabase metabase/metabase
Docker compose for simplification
● Use configuration files based on yaml format.
● Easy to configure different configurations for different environments.
Docker compose basic commands
# building the docker
docker-compose -f <config>.yml build
# Start the docker
docker-compose -f <config>.yml up
# Note: all yml files under $BILLRUN_DIR/docker/billrun-docker/
Docker compose basic commands
# stopping the docker
docker-compose -f <config>.yml stop
# delete the docker
docker-compose -f <config>.yml down
# Note: all yml files under $BILLRUN_DIR/docker/billrun-docker/
Docker compose do-it-all command
# build and run the docker including permission setup and version selection
# for example, run PHP 8.0 stack
cd $BILLRUN_DIR/docker/billrun-docker
./run_docker.sh 80
# or run PHP 7.4 stack
./run_docker.sh 74
BillRun Docker Examples CLI
# BillRun commands
docker exec billrun-app /usr/local/bin/php /billrun/public/index.php --env=container --cron --type daily
docker exec -w /billrun billrun-app php /billrun/public/index.php --env=container --receive --type
SALT_LI_INP
# MongoDB commands & scripts
docker exec -it billrun-mongodb mongo billing_container /billrun/mongo/migration/script.js
docker exec billrun-mongodb mongoimport -d billing_container -c subscribers --gzip
/billrun/subscribers.bson.gz
# Enter to the docker container itself
docker exec -it billrun-app bash
BillRun Docker Communications
Host name IP Host Port Internal Port
billrun-app 10.103.0.2 - 9000
billrun-nginx 10.103.0.4 8080 [PHP 8.0]/8074 [PHP 7.4] 80
billrun-mongodb 10.103.0.3 27017 27017
Docker Containers talking to each other
Your host; browser or native CLI
10.103.0.1
BillRun Docker Communications
Application
PHP-FPM
PHP-CLI
billrun-app
10.103.0.2
Web-service
Nginx
billrun-nginx
10.103.0.4
Database
MongoDB
billrun-mongodb
10.103.0.3
:9000
:80
:27017
:27017
:9000
:8080
Docker - communication example
# From BillRun PHP plugin code:
$ret = Billrun_Util::sendRequest('http://billrun-nginx:80/api/pay', $requestData,
Zend_Http_Client::GET, $headers);
# Connect to mongo console from the host
mongo billing_container
# Connect to mongo console from the mongodb container
docker exec -it billrun-mongodb mongo billing_container
Docker Roadmap
Future features
● Multiple containers of the same type running in parallel.
● MongoDB cluster container(s)
● Customer Portal container.
● Enable emails sending.
● Enable crontab automatically.
● Enable client repo (invoice layout, plugins, migration script, etc).
Thank You.

More Related Content

PPTX
Introduction to docker
PDF
Direccionamiento ip
PPT
Docker introduction
PDF
Docker
PPTX
Dockerizing a Symfony2 application
PPTX
Introduction To Docker
PPTX
Docker-Presentation.pptx
PDF
Docker puebla bday #4 celebration
Introduction to docker
Direccionamiento ip
Docker introduction
Docker
Dockerizing a Symfony2 application
Introduction To Docker
Docker-Presentation.pptx
Docker puebla bday #4 celebration

Similar to BillRun Docker Introduction (20)

PPTX
Docker for dev
PDF
Introduction of Docker and Docker Compose
PPTX
Docker for Web Developers: A Sneak Peek
PDF
Docker presentation
PPTX
Docker: From Zero to Hero
PDF
Docker for developers
PDF
Docker for developers
PDF
Introduction to Docker
PPTX
Start your adventure with docker
PDF
Introduction to Docker at Glidewell Laboratories in Orange County
PDF
手把手帶你學 Docker 入門篇
PDF
Docker workshop 0507 Taichung
PDF
Before & After Docker Init
PDF
Introduction to Docker and Monitoring with InfluxData
PPTX
Containerization and Docker
PPTX
Introduction to Docker
PDF
Containers and Docker
PDF
Killer Docker Workflows for Development
ODP
Docker Basics
PDF
Containerizing Web Application with Docker
Docker for dev
Introduction of Docker and Docker Compose
Docker for Web Developers: A Sneak Peek
Docker presentation
Docker: From Zero to Hero
Docker for developers
Docker for developers
Introduction to Docker
Start your adventure with docker
Introduction to Docker at Glidewell Laboratories in Orange County
手把手帶你學 Docker 入門篇
Docker workshop 0507 Taichung
Before & After Docker Init
Introduction to Docker and Monitoring with InfluxData
Containerization and Docker
Introduction to Docker
Containers and Docker
Killer Docker Workflows for Development
Docker Basics
Containerizing Web Application with Docker
Ad

More from Ofer Cohen (12)

PDF
MongoDB World 2014 - BillRun, Billing on top of MongoDB
PDF
BillRun and Joomla - How is Joomla relate to billing system
PDF
Proposals, contracts and clients for web developers - Ofer Cohen
PDF
Joomla!Day Poland 2013 - Joomla Architecture (Ofer Cohen)
PDF
Joomla!Day Poland 2013 - Joomla and Open Source - How it works and how can I ...
PDF
Wordcamp Jerusalem 2013 - what if Wordpress was not open source
PDF
Joomla!Day 2013 India
PDF
Joomla!Day Israel 2012 - The business of Joomla
PDF
וורדפרס, ג'ומלה, דרופל וכל מה שביניהם‏
PDF
ג'ומלה ישראל - ותיקים מדריכים חדשים
PDF
Jab12 - Joomla! architecture revealed
PDF
Israel Joomla! 1.6 Party
MongoDB World 2014 - BillRun, Billing on top of MongoDB
BillRun and Joomla - How is Joomla relate to billing system
Proposals, contracts and clients for web developers - Ofer Cohen
Joomla!Day Poland 2013 - Joomla Architecture (Ofer Cohen)
Joomla!Day Poland 2013 - Joomla and Open Source - How it works and how can I ...
Wordcamp Jerusalem 2013 - what if Wordpress was not open source
Joomla!Day 2013 India
Joomla!Day Israel 2012 - The business of Joomla
וורדפרס, ג'ומלה, דרופל וכל מה שביניהם‏
ג'ומלה ישראל - ותיקים מדריכים חדשים
Jab12 - Joomla! architecture revealed
Israel Joomla! 1.6 Party
Ad

Recently uploaded (20)

PDF
Nekopoi APK 2025 free lastest update
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PPTX
Odoo POS Development Services by CandidRoot Solutions
PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PPTX
L1 - Introduction to python Backend.pptx
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PPTX
CHAPTER 2 - PM Management and IT Context
PDF
Softaken Excel to vCard Converter Software.pdf
PPTX
ai tools demonstartion for schools and inter college
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PPTX
Transform Your Business with a Software ERP System
PDF
medical staffing services at VALiNTRY
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
Nekopoi APK 2025 free lastest update
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Odoo POS Development Services by CandidRoot Solutions
PTS Company Brochure 2025 (1).pdf.......
Design an Analysis of Algorithms II-SECS-1021-03
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Upgrade and Innovation Strategies for SAP ERP Customers
Operating system designcfffgfgggggggvggggggggg
How to Migrate SBCGlobal Email to Yahoo Easily
L1 - Introduction to python Backend.pptx
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Odoo Companies in India – Driving Business Transformation.pdf
CHAPTER 2 - PM Management and IT Context
Softaken Excel to vCard Converter Software.pdf
ai tools demonstartion for schools and inter college
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
Transform Your Business with a Software ERP System
medical staffing services at VALiNTRY
VVF-Customer-Presentation2025-Ver1.9.pptx

BillRun Docker Introduction

  • 3. What is docker? Package Software into Standardized Units for Development, Shipment and Deployment.
  • 4. What is container? container is a standard unit of software that packages up code and all its dependencies so the application runs quickly and reliably from one computing environment to another.
  • 5. What is docker image? The basic copy of the container. The “CD” disk that install the container.
  • 6. Docker & Container Docker is managing the container(s).
  • 7. Old World vs New World
  • 8. Docker How did we implement it?
  • 10. BillRun Docker 3 Containers Application PHP-FPM PHP-CLI Web-service Nginx Database MongoDB
  • 11. BillRun Docker ● Running on your native development repository ○ mapping host directory to container directory /billrun/ ● Support: ○ PHP 7.4 with MongoDB 4.2; or ○ PHP 8.0 with MongoDB 4.4
  • 12. BillRun Docker ● BillRun env is container (instead of dev) ○ BillRun conf is conf/container.ini ● Xdebug is working ○ port 9090 for PHP 7.4 ○ port 9091 for PHP 8.0 ● Can run native CLI command ● DB name is billing_container
  • 13. Your host ~/projects/billrun BillRun Directories Mapping /billrun/ Application PHP-FPM PHP-CLI /billrun/ Web-service Nginx /billrun/ Database MongoDB RO RO
  • 14. Docker Let’s get our hands dirty
  • 15. Docker sample command docker run --restart unless-stopped -d -p 3000:3000 -e MUID=$MUID -e MGID=$MGID -e "MB_DB_TYPE=mysql" -e "MB_DB_DBNAME=metabase" -e "MB_DB_PORT=3306" -e "MB_DB_USER=metabase_user" -e "MB_DB_PASS=12345678" -e "MB_DB_HOST=127.0.0.1" -e "JAVA_TIMEZONE=Asia/Jerusalem" -e "JAVA_TOOL_OPTIONS=-Xmx2g" --name metabase metabase/metabase
  • 16. Docker compose for simplification ● Use configuration files based on yaml format. ● Easy to configure different configurations for different environments.
  • 17. Docker compose basic commands # building the docker docker-compose -f <config>.yml build # Start the docker docker-compose -f <config>.yml up # Note: all yml files under $BILLRUN_DIR/docker/billrun-docker/
  • 18. Docker compose basic commands # stopping the docker docker-compose -f <config>.yml stop # delete the docker docker-compose -f <config>.yml down # Note: all yml files under $BILLRUN_DIR/docker/billrun-docker/
  • 19. Docker compose do-it-all command # build and run the docker including permission setup and version selection # for example, run PHP 8.0 stack cd $BILLRUN_DIR/docker/billrun-docker ./run_docker.sh 80 # or run PHP 7.4 stack ./run_docker.sh 74
  • 20. BillRun Docker Examples CLI # BillRun commands docker exec billrun-app /usr/local/bin/php /billrun/public/index.php --env=container --cron --type daily docker exec -w /billrun billrun-app php /billrun/public/index.php --env=container --receive --type SALT_LI_INP # MongoDB commands & scripts docker exec -it billrun-mongodb mongo billing_container /billrun/mongo/migration/script.js docker exec billrun-mongodb mongoimport -d billing_container -c subscribers --gzip /billrun/subscribers.bson.gz # Enter to the docker container itself docker exec -it billrun-app bash
  • 21. BillRun Docker Communications Host name IP Host Port Internal Port billrun-app 10.103.0.2 - 9000 billrun-nginx 10.103.0.4 8080 [PHP 8.0]/8074 [PHP 7.4] 80 billrun-mongodb 10.103.0.3 27017 27017
  • 22. Docker Containers talking to each other
  • 23. Your host; browser or native CLI 10.103.0.1 BillRun Docker Communications Application PHP-FPM PHP-CLI billrun-app 10.103.0.2 Web-service Nginx billrun-nginx 10.103.0.4 Database MongoDB billrun-mongodb 10.103.0.3 :9000 :80 :27017 :27017 :9000 :8080
  • 24. Docker - communication example # From BillRun PHP plugin code: $ret = Billrun_Util::sendRequest('http://billrun-nginx:80/api/pay', $requestData, Zend_Http_Client::GET, $headers); # Connect to mongo console from the host mongo billing_container # Connect to mongo console from the mongodb container docker exec -it billrun-mongodb mongo billing_container
  • 26. Future features ● Multiple containers of the same type running in parallel. ● MongoDB cluster container(s) ● Customer Portal container. ● Enable emails sending. ● Enable crontab automatically. ● Enable client repo (invoice layout, plugins, migration script, etc).