SlideShare a Scribd company logo
Oğuzhan YILMAZ
MaestroPanel Kurucusu
oguzhan@maestropanel.com
Docker ile Web Hosting
MaestroPanel Drink-Up
18 Ağustos 2016
Sorun?
Problemin Matrix’i
1960 Öncesin Taşımacılık
Başka Bir Açıdan Problemin Matrix’i
Çözüm: Intermodal Shipping Container
Docker, Uygulamalar için Container Sistemi
Docker (2013)
Nedir?
 Docker Engine
 Docker Daemon
 Command Line
 Docker Registry
 Docker Hub
 Cloud Servisi
 Uygulama Paylaşımı
 Otomatik İş Akışları
Cgroups Namespace Image
Docker
Container
CPU, RAM, Disk, IO UTS,IPC,PID,NET,USR TAR
Dockerfile
Nedir?
 Makefile Benzeri
 Genişletilebilir
 Yeni Docker Imajı Çıktısı Verir
 Container Emilerini Belirler
Dockerfile
Base
Image
Docker
Container
FROM node:latest
MAINTAINAR MaestroPanel <ping@maestropanel.com>
RUN cd /src; npm install
RUN useradd -c 'Node.js user' -m -d /home/node -s /bin/bash node
RUN chown -R node.node /src
USER node
ENV HOME /home/node
EXPOSE 8080
CMD ["node", "/src/index.js"]
docker build --tag node:latest --file mynode .
Dockerfile
Docker İle Web Hosting
Mimari
OCI – Open Container Initiative
runC
universal container runtime
Docker Engine
Kernel 3.10+
containerd
client
App1 App2 App3 App4
stop,start,create,delete
Fark
Klasik Docker
1. Web Server’ı Kur
2. PHP Kur (Versiyon?)
3. Web Server’ı PHP’ye göre
konfigüre et. (Fast-Cgi, FPM?)
4. Vhost’u konfigüre et.
5. MySQL’i kur
6. FTP’yi Kur, Konfigüre et.
7. Wordpress Dosyalarını FTP
alanına kopyala.
8. Bakımlarını takip et.
1. Docker pull wordpress
2. Docker pull mysql
3. Docker run wordpress –link
mysql
WordPress çalıştıralım;
www.boycottdocker.org
Demo
Web Hosting
Docker Daemon Koruyun
Docker ile Hosting
docker daemon --tlsverify --tlscacert=ca.pem 
--tlscert=server-cert.pem --tlskey=server-key.pem 
-H=0.0.0.0:2376 --icc=false ....
firewall-cmd --permanent --zone=public --add-source=192.168.0.65/32
firewall-cmd --reload
docker daemon --config-file /etc/docker/daemon.json
veya
Containerları root hakkı ile çalıştırmayın
Docker ile Hosting
docker run --name domain.com --user domain.com –d wordpress:latest –h domain.com
docker run --name domain.com --user domain.com –d wordpress:latest --cap-drop=all
Daha güvenli
useradd –M -s /sbin/nologin domain.com –c ‘docker user’ –g containers
Disk volume’larını İzole Yapın
Docker ile Hosting
docker volume create --name domain.com –opt o=size=1000m,uid=1543
Proses’leri ve Dosyaları Limitleyin
Docker ile Hosting
docker run --name domain.com --ulimit nofile=128:256 --ulimit
nproc=32:64
CPU’yu Limitleyin
Docker ile Hosting
docker run --name domain.com --cpuset=0,1 --cpu-quota=25000
Memor Limitleyin
Docker ile Hosting
docker run --name domain.com -m 128m --oom-kill-disable
Reverse-Proxy Kullanın
Docker ile Hosting
server {
listen 80;
server_name domain.com;
location / {
proxy_pass http://192.168.59.103:8080/;
}
}
Nginx vs. HAproxy
domain.com.conf
Container Paketi
Docker ile Hosting
150$/Ay
4 Core CPU
8 GB Ram
10 GB Disk
Private Registry*
DNS Management
2 Public IP
100.000 GB Traffic
MySQL, MSSQL Service*
Backup Data*
Ürünler
Docker ile Hosting
• Kubernetes (kubernetes.io)
• Jelastic (jelastic.com)
• KuberDock (cloudlinux.com)
• Mesos (mesos.apache.org)
• Docker Swarm (docker.com)
• Deis (deis.io)
DockerDaemon(API,CLI)
F
T
P
Nginx
DNS
SQL
Docker
Registry
containers
volumesimages
portmaps
domain.com
domain.com
container
domain.com
volume
12factor
http://12factor.net/
https://github.com/maestropanel/mpod
mpod
?Oğuzhan YILMAZ
MaestroPanel Kurucusu
oguzhan@maestropanel.com

More Related Content

PDF
PHPKonf'15 PHP Uygulamalarını Docker ile Çalıştırmak
PDF
Nginx sunu 2014
PPTX
Docker Egitimi
PDF
Kali linux
PDF
PDF
Oracle Cloud Servisleri Uygulaması- Oracle Cloud Day 2015 Istanbul
PDF
Sanallaştırmada Yeni Akım - Docker
PPTX
Abis Teknoloji şirket içi Docker sunumu
PHPKonf'15 PHP Uygulamalarını Docker ile Çalıştırmak
Nginx sunu 2014
Docker Egitimi
Kali linux
Oracle Cloud Servisleri Uygulaması- Oracle Cloud Day 2015 Istanbul
Sanallaştırmada Yeni Akım - Docker
Abis Teknoloji şirket içi Docker sunumu

What's hot (8)

PDF
Docker 101
PDF
Linux'a Giris ve VirtualBox a Ubuntu Kurulumu
DOC
11 g RAC -ASM
PPT
Kali linux nmon analyzer kurulumu
PDF
Sanallastirmada yeni akim: Docker
PDF
Exadata Performance Notes
PDF
Temel Linux Kullanımı ve Komutları
PDF
Chroot içinde {DNS, NTP, Nginx, PHP-FPM}
Docker 101
Linux'a Giris ve VirtualBox a Ubuntu Kurulumu
11 g RAC -ASM
Kali linux nmon analyzer kurulumu
Sanallastirmada yeni akim: Docker
Exadata Performance Notes
Temel Linux Kullanımı ve Komutları
Chroot içinde {DNS, NTP, Nginx, PHP-FPM}
Ad

Viewers also liked (13)

PPTX
音楽市場
PDF
PDF
Hosting Dergi 14.SAYI
PDF
Infographie - Statut JEI : Comment bénéficier de réductions fiscales et socia...
PDF
Social Media Coaching @Detecon
DOCX
GRC Martin 08 16
PDF
What are the most viable forms of alternative propulsion for the future of sp...
PPTX
Say to you
PDF
Infographie - Entrepreneurs : c'est quoi l'ACCRE ?
PDF
Edital 002/2016 : EEEP Alan Pinho Tabosa
PDF
Truth behind the implementation of school management software
PDF
THE DAY AFTER TOMORROW - DIGITALISIERUNG UND DIE ZUKUNFT DER ARBEIT
PPTX
BAB 1 -PENGURUSAN (PENGAJIAN PERNIAGAAN)
音楽市場
Hosting Dergi 14.SAYI
Infographie - Statut JEI : Comment bénéficier de réductions fiscales et socia...
Social Media Coaching @Detecon
GRC Martin 08 16
What are the most viable forms of alternative propulsion for the future of sp...
Say to you
Infographie - Entrepreneurs : c'est quoi l'ACCRE ?
Edital 002/2016 : EEEP Alan Pinho Tabosa
Truth behind the implementation of school management software
THE DAY AFTER TOMORROW - DIGITALISIERUNG UND DIE ZUKUNFT DER ARBEIT
BAB 1 -PENGURUSAN (PENGAJIAN PERNIAGAAN)
Ad

Similar to Docker İle Web Hosting (18)

PDF
Docker - Ankara Cloud Meetup
PDF
Docker Nedir, Ne İşe Yarar, Nasıl Kullanılmalıdır?
PDF
OpenStack Türkiye 15.Meetup Ankara: Containers, Kubernetes and OpenStack
PPSX
Teknolojide Atılım - Docker İle Konforlu Geliştirme Ortamı
PDF
Docker, Konteyner Teknolojisi Nedir? Docker Güvenliği Nasıl Sağlanır?
PPTX
Openstack Magnum CaaS
PPTX
vSphere Integrated Containers
PPTX
Docker ve kubernetes ile ilgili kısa bilgilendirmeler
PDF
Laravel51 türkçe sample
PPTX
Azure Container Service
PDF
Docker Compose & Swarm @ Docker İzmir
PDF
Docker node-nginx-redis ipnordic demo
DOCX
linux hosting
PPTX
Kontrol Panel Sistemleri, Hosting Festivali 2014
PDF
Web Uygulama Güvenliği Ve Güvenli Kod Geliştirme Eğitim Notlarım
PPTX
Linkle mimari
PDF
WordPress ile buyuk olcekli siteler
PPTX
OPENSHIFT KONTEYNER PLATFORM İLE GELİŞTİRMEYE HIZLI BAŞLANGIÇ - Webinar-Aug2017
Docker - Ankara Cloud Meetup
Docker Nedir, Ne İşe Yarar, Nasıl Kullanılmalıdır?
OpenStack Türkiye 15.Meetup Ankara: Containers, Kubernetes and OpenStack
Teknolojide Atılım - Docker İle Konforlu Geliştirme Ortamı
Docker, Konteyner Teknolojisi Nedir? Docker Güvenliği Nasıl Sağlanır?
Openstack Magnum CaaS
vSphere Integrated Containers
Docker ve kubernetes ile ilgili kısa bilgilendirmeler
Laravel51 türkçe sample
Azure Container Service
Docker Compose & Swarm @ Docker İzmir
Docker node-nginx-redis ipnordic demo
linux hosting
Kontrol Panel Sistemleri, Hosting Festivali 2014
Web Uygulama Güvenliği Ve Güvenli Kod Geliştirme Eğitim Notlarım
Linkle mimari
WordPress ile buyuk olcekli siteler
OPENSHIFT KONTEYNER PLATFORM İLE GELİŞTİRMEYE HIZLI BAŞLANGIÇ - Webinar-Aug2017

Docker İle Web Hosting