SlideShare a Scribd company logo
1 of 9
Download to read offline
Docker + PostgreSQL 
Fernando Ike – PGDay Campinas
● http://www.postgresql.org.br 
● http://planeta.postgresql.org.br 
● http://pgbr.postgresql.org.br
Instalação 
● Debian 
#aptitude install docker.io 
● Ubuntu 
#apt-get install docker.io
Install/Run 
● Debian 
$docker run -d -p 5432:5432 fike/debian-postgresql:9.4-ptbr 
● Ubuntu 
$docker run -d -p 5432:5432 fike/ubuntu-postgresql:9.4-ptbr1
Entrando no PostgreSQL 
$CONTAINER_PG=$(docker ps -q) 
$docker run -i -t --net="container:$CONTAINER_PG"  
fike/debian-postgresql:9.4-ptbr /bin/bash 
$psql -U postgresql -h 127.0.0.1 -W “foobar”
Logs 
$CONTAINER_PG=$(docker ps -q) 
$docker logs -f $CONTAINER_PG 
$docker run -i -t --net="container:$CONTAINER_PG"  
fike/debian-postgresql:9.4-ptbr  
tail -f /var/log/postgresql/postgresql-9.4-main.log
Links 
● https://registry.hub.docker.com/u/fike/ubuntu-postgresql/ 
● https://registry.hub.docker.com/u/fike/debian-postgresql/ 
● https://docs.docker.com/examples/postgresql_service/ 
● https://groups.google.com/forum/#!forum/docker-users-br 
● http://www.docker.io
Contato 
● Site: http://www.fernandoike.com 
● Email: fike at midstorm.org 
● Twiter: @fernandoike 
● Linkedin: https://www.linkedin.com/in/fernandoike

More Related Content

What's hot

Dockerizing Symfony Applications - Symfony Live Berlin 2014
Dockerizing Symfony Applications - Symfony Live Berlin 2014Dockerizing Symfony Applications - Symfony Live Berlin 2014
Dockerizing Symfony Applications - Symfony Live Berlin 2014
D
 
Inside Sqale's Backend at Sapporo Ruby Kaigi 2012
Inside Sqale's Backend at Sapporo Ruby Kaigi 2012Inside Sqale's Backend at Sapporo Ruby Kaigi 2012
Inside Sqale's Backend at Sapporo Ruby Kaigi 2012
Gosuke Miyashita
 

What's hot (20)

Docker 101 - from 0 to Docker in 30 minutes
Docker 101 - from 0 to Docker in 30 minutesDocker 101 - from 0 to Docker in 30 minutes
Docker 101 - from 0 to Docker in 30 minutes
 
Dockerizing Symfony Applications - Symfony Live Berlin 2014
Dockerizing Symfony Applications - Symfony Live Berlin 2014Dockerizing Symfony Applications - Symfony Live Berlin 2014
Dockerizing Symfony Applications - Symfony Live Berlin 2014
 
Docker perl build
Docker perl buildDocker perl build
Docker perl build
 
Meetup C++ Floripa - Conan.io
Meetup C++ Floripa - Conan.ioMeetup C++ Floripa - Conan.io
Meetup C++ Floripa - Conan.io
 
Inside Sqale's Backend at Sapporo Ruby Kaigi 2012
Inside Sqale's Backend at Sapporo Ruby Kaigi 2012Inside Sqale's Backend at Sapporo Ruby Kaigi 2012
Inside Sqale's Backend at Sapporo Ruby Kaigi 2012
 
Docker / Ansible
Docker / AnsibleDocker / Ansible
Docker / Ansible
 
Deploying Symfony2 app with Ansible
Deploying Symfony2 app with AnsibleDeploying Symfony2 app with Ansible
Deploying Symfony2 app with Ansible
 
Start tracking your ruby infrastructure
Start tracking your ruby infrastructureStart tracking your ruby infrastructure
Start tracking your ruby infrastructure
 
Gebruik dezelfde Docker container voor Java applicaties tijdens ontwikkelen e...
Gebruik dezelfde Docker container voor Java applicaties tijdens ontwikkelen e...Gebruik dezelfde Docker container voor Java applicaties tijdens ontwikkelen e...
Gebruik dezelfde Docker container voor Java applicaties tijdens ontwikkelen e...
 
Openwrt startup
Openwrt startupOpenwrt startup
Openwrt startup
 
When Docker ends, Chef begins ~ #idi2015 Incontro DevOps Italia
When Docker ends, Chef begins ~ #idi2015 Incontro DevOps ItaliaWhen Docker ends, Chef begins ~ #idi2015 Incontro DevOps Italia
When Docker ends, Chef begins ~ #idi2015 Incontro DevOps Italia
 
SwiftyGPIO
SwiftyGPIOSwiftyGPIO
SwiftyGPIO
 
Embedded Linux Odp
Embedded Linux OdpEmbedded Linux Odp
Embedded Linux Odp
 
Putting some "logic" in LVM.
Putting some "logic" in LVM.Putting some "logic" in LVM.
Putting some "logic" in LVM.
 
Conan a C/C++ Package Manager
Conan a C/C++ Package ManagerConan a C/C++ Package Manager
Conan a C/C++ Package Manager
 
Dockerize Me: Distributed PHP applications with Symfony, Docker, Consul and A...
Dockerize Me: Distributed PHP applications with Symfony, Docker, Consul and A...Dockerize Me: Distributed PHP applications with Symfony, Docker, Consul and A...
Dockerize Me: Distributed PHP applications with Symfony, Docker, Consul and A...
 
Docker: From Zero to Hero
Docker: From Zero to HeroDocker: From Zero to Hero
Docker: From Zero to Hero
 
Docker
DockerDocker
Docker
 
Containerizing Web Application with Docker
Containerizing Web Application with DockerContainerizing Web Application with Docker
Containerizing Web Application with Docker
 
Install openstack
Install openstackInstall openstack
Install openstack
 

Similar to Docker e postgresql

mapserver_install_linux
mapserver_install_linuxmapserver_install_linux
mapserver_install_linux
tutorialsruby
 
mapserver_install_linux
mapserver_install_linuxmapserver_install_linux
mapserver_install_linux
tutorialsruby
 
mapserver_install_linux
mapserver_install_linuxmapserver_install_linux
mapserver_install_linux
tutorialsruby
 
mapserver_install_linux
mapserver_install_linuxmapserver_install_linux
mapserver_install_linux
tutorialsruby
 
Empacotamento e backport de aplicações em debian
Empacotamento e backport de aplicações em debianEmpacotamento e backport de aplicações em debian
Empacotamento e backport de aplicações em debian
Andre Ferraz
 
Docker & FieldAware
Docker & FieldAwareDocker & FieldAware
Docker & FieldAware
Jakub Jarosz
 

Similar to Docker e postgresql (20)

Docker workshop DevOpsDays Amsterdam 2014
Docker workshop DevOpsDays Amsterdam 2014Docker workshop DevOpsDays Amsterdam 2014
Docker workshop DevOpsDays Amsterdam 2014
 
Software Packaging for Cross OS Distribution
Software Packaging for Cross OS DistributionSoftware Packaging for Cross OS Distribution
Software Packaging for Cross OS Distribution
 
2017-03-11 02 Денис Нелюбин. Docker & Ansible - лучшие друзья DevOps
2017-03-11 02 Денис Нелюбин. Docker & Ansible - лучшие друзья DevOps2017-03-11 02 Денис Нелюбин. Docker & Ansible - лучшие друзья DevOps
2017-03-11 02 Денис Нелюбин. Docker & Ansible - лучшие друзья DevOps
 
mapserver_install_linux
mapserver_install_linuxmapserver_install_linux
mapserver_install_linux
 
mapserver_install_linux
mapserver_install_linuxmapserver_install_linux
mapserver_install_linux
 
mapserver_install_linux
mapserver_install_linuxmapserver_install_linux
mapserver_install_linux
 
mapserver_install_linux
mapserver_install_linuxmapserver_install_linux
mapserver_install_linux
 
Hands-On Session Docker
Hands-On Session DockerHands-On Session Docker
Hands-On Session Docker
 
Empacotamento e backport de aplicações em debian
Empacotamento e backport de aplicações em debianEmpacotamento e backport de aplicações em debian
Empacotamento e backport de aplicações em debian
 
Using python and docker for data science
Using python and docker for data scienceUsing python and docker for data science
Using python and docker for data science
 
Hadoop Installation
Hadoop InstallationHadoop Installation
Hadoop Installation
 
Docker for data science
Docker for data scienceDocker for data science
Docker for data science
 
Using docker for data science - part 2
Using docker for data science - part 2Using docker for data science - part 2
Using docker for data science - part 2
 
Docker tips & tricks
Docker  tips & tricksDocker  tips & tricks
Docker tips & tricks
 
Docker & FieldAware
Docker & FieldAwareDocker & FieldAware
Docker & FieldAware
 
Qt native built for raspberry zero
Qt native built for  raspberry zeroQt native built for  raspberry zero
Qt native built for raspberry zero
 
Vagrant move over, here is Docker
Vagrant move over, here is DockerVagrant move over, here is Docker
Vagrant move over, here is Docker
 
Docker for mere mortals
Docker for mere mortalsDocker for mere mortals
Docker for mere mortals
 
Docker - from development to production (PHPNW 2017-09-05)
Docker - from development to production (PHPNW 2017-09-05)Docker - from development to production (PHPNW 2017-09-05)
Docker - from development to production (PHPNW 2017-09-05)
 
From Docker Run To Docker Compose
From Docker Run To Docker ComposeFrom Docker Run To Docker Compose
From Docker Run To Docker Compose
 

More from Fernando Ike

Researching postgresql
Researching postgresqlResearching postgresql
Researching postgresql
Fernando Ike
 

More from Fernando Ike (20)

Arquitetura de Micro Serviços
Arquitetura de Micro ServiçosArquitetura de Micro Serviços
Arquitetura de Micro Serviços
 
(Quase) 10 anos de DevOps, e agora?
(Quase) 10 anos de DevOps, e agora? (Quase) 10 anos de DevOps, e agora?
(Quase) 10 anos de DevOps, e agora?
 
Containers and Databases
Containers and DatabasesContainers and Databases
Containers and Databases
 
Infraestrutura Imutável - Agile Trends
Infraestrutura Imutável - Agile TrendsInfraestrutura Imutável - Agile Trends
Infraestrutura Imutável - Agile Trends
 
Infraestrutura imutável - A base das aplicações na nuvem
Infraestrutura imutável - A base das aplicações na nuvemInfraestrutura imutável - A base das aplicações na nuvem
Infraestrutura imutável - A base das aplicações na nuvem
 
DevOps Anti-Patterns - Campus Party
DevOps Anti-Patterns - Campus PartyDevOps Anti-Patterns - Campus Party
DevOps Anti-Patterns - Campus Party
 
Blameless: A culpa não é sua
Blameless: A culpa não é suaBlameless: A culpa não é sua
Blameless: A culpa não é sua
 
DevOps: A revolução ruidosa da TI
DevOps: A revolução ruidosa da TIDevOps: A revolução ruidosa da TI
DevOps: A revolução ruidosa da TI
 
Docker Swarm Cluster
Docker Swarm ClusterDocker Swarm Cluster
Docker Swarm Cluster
 
DevOps - Por onde começar
DevOps - Por onde começarDevOps - Por onde começar
DevOps - Por onde começar
 
DevOps Anti-Patterns
DevOps Anti-PatternsDevOps Anti-Patterns
DevOps Anti-Patterns
 
A lista do PostgerSQL Brasil caiu?
A lista do PostgerSQL Brasil caiu? A lista do PostgerSQL Brasil caiu?
A lista do PostgerSQL Brasil caiu?
 
Container revolucao
Container revolucaoContainer revolucao
Container revolucao
 
Akamai Cloud Security
Akamai Cloud SecurityAkamai Cloud Security
Akamai Cloud Security
 
Management 3.0 - a vida pós-agilidade
Management 3.0 - a vida pós-agilidadeManagement 3.0 - a vida pós-agilidade
Management 3.0 - a vida pós-agilidade
 
Docker na vida real
Docker na vida realDocker na vida real
Docker na vida real
 
Devops
DevopsDevops
Devops
 
Um milhao de usuários simultâneos
Um milhao de usuários simultâneosUm milhao de usuários simultâneos
Um milhao de usuários simultâneos
 
Banco caiu! E a gora?
Banco caiu! E a gora?Banco caiu! E a gora?
Banco caiu! E a gora?
 
Researching postgresql
Researching postgresqlResearching postgresql
Researching postgresql
 

Recently uploaded

Recovery Heroes 247- Recovery Services.pdf
Recovery Heroes 247- Recovery Services.pdfRecovery Heroes 247- Recovery Services.pdf
Recovery Heroes 247- Recovery Services.pdf
Recovery Heroes 247
 
Explore amazing adventures in the mountain kingdom country
Explore amazing adventures in the mountain kingdom countryExplore amazing adventures in the mountain kingdom country
Explore amazing adventures in the mountain kingdom country
mantsebo72
 
Experiencing the history of Masitise cave and housing in Lesotho
Experiencing the history of Masitise cave and housing in LesothoExperiencing the history of Masitise cave and housing in Lesotho
Experiencing the history of Masitise cave and housing in Lesotho
paballosylviatsunyan
 

Recently uploaded (20)

Tourist_Attractions_in_Lesotho_prepared_by_Reabetsoe_Bereng.pptx
Tourist_Attractions_in_Lesotho_prepared_by_Reabetsoe_Bereng.pptxTourist_Attractions_in_Lesotho_prepared_by_Reabetsoe_Bereng.pptx
Tourist_Attractions_in_Lesotho_prepared_by_Reabetsoe_Bereng.pptx
 
The impact development on dams and mines
The impact development on dams and minesThe impact development on dams and mines
The impact development on dams and mines
 
What Should I Know Before Booking A Catamaran In Aruba
What Should I Know Before Booking A Catamaran In ArubaWhat Should I Know Before Booking A Catamaran In Aruba
What Should I Know Before Booking A Catamaran In Aruba
 
Myanmar 80 Greetings and colors from Myanmar
Myanmar 80 Greetings and colors from MyanmarMyanmar 80 Greetings and colors from Myanmar
Myanmar 80 Greetings and colors from Myanmar
 
Chennai's Temple Trail Navigating the Top 10 Temples for First-Time Visitors.pdf
Chennai's Temple Trail Navigating the Top 10 Temples for First-Time Visitors.pdfChennai's Temple Trail Navigating the Top 10 Temples for First-Time Visitors.pdf
Chennai's Temple Trail Navigating the Top 10 Temples for First-Time Visitors.pdf
 
PLACE OF ATTRACTION IN LESOTHO Sani Pass
PLACE OF ATTRACTION IN LESOTHO Sani PassPLACE OF ATTRACTION IN LESOTHO Sani Pass
PLACE OF ATTRACTION IN LESOTHO Sani Pass
 
10 precious day Vietnam ( 19-28 Sep ) .pdf
10 precious day Vietnam ( 19-28 Sep ) .pdf10 precious day Vietnam ( 19-28 Sep ) .pdf
10 precious day Vietnam ( 19-28 Sep ) .pdf
 
Jackrabbit Limousine - Your Fast And Reliable Ride
Jackrabbit Limousine - Your Fast And Reliable RideJackrabbit Limousine - Your Fast And Reliable Ride
Jackrabbit Limousine - Your Fast And Reliable Ride
 
Recovery Heroes 247- Recovery Services.pdf
Recovery Heroes 247- Recovery Services.pdfRecovery Heroes 247- Recovery Services.pdf
Recovery Heroes 247- Recovery Services.pdf
 
The most tourism attractions in Lesotho.
The most tourism attractions in Lesotho.The most tourism attractions in Lesotho.
The most tourism attractions in Lesotho.
 
TOURISM ATTRACTION IN LESOTHO 2024.pptx.
TOURISM ATTRACTION IN LESOTHO 2024.pptx.TOURISM ATTRACTION IN LESOTHO 2024.pptx.
TOURISM ATTRACTION IN LESOTHO 2024.pptx.
 
A_Brief_Introductory_of_Nuristan, by Ab.Hakim Hakimi.pdf
A_Brief_Introductory_of_Nuristan, by Ab.Hakim Hakimi.pdfA_Brief_Introductory_of_Nuristan, by Ab.Hakim Hakimi.pdf
A_Brief_Introductory_of_Nuristan, by Ab.Hakim Hakimi.pdf
 
Overview of Lesotho 's natural beauty tourist attractions
Overview of Lesotho 's natural beauty tourist attractionsOverview of Lesotho 's natural beauty tourist attractions
Overview of Lesotho 's natural beauty tourist attractions
 
TOURISM ATTRACTIONS IN LESOTHO KATSE DAM
TOURISM ATTRACTIONS IN LESOTHO KATSE DAMTOURISM ATTRACTIONS IN LESOTHO KATSE DAM
TOURISM ATTRACTIONS IN LESOTHO KATSE DAM
 
Explore amazing adventures in the mountain kingdom country
Explore amazing adventures in the mountain kingdom countryExplore amazing adventures in the mountain kingdom country
Explore amazing adventures in the mountain kingdom country
 
Tourism attractions in Lesotho e.g dam
Tourism attractions in  Lesotho  e.g damTourism attractions in  Lesotho  e.g dam
Tourism attractions in Lesotho e.g dam
 
TOURISM ATTRACTION IN LESOTHO 2024.Pptx.
TOURISM ATTRACTION IN LESOTHO 2024.Pptx.TOURISM ATTRACTION IN LESOTHO 2024.Pptx.
TOURISM ATTRACTION IN LESOTHO 2024.Pptx.
 
Experiencing the history of Masitise cave and housing in Lesotho
Experiencing the history of Masitise cave and housing in LesothoExperiencing the history of Masitise cave and housing in Lesotho
Experiencing the history of Masitise cave and housing in Lesotho
 
Explore the Best of North India Shimla, Manali, Dalhousie, Delhi .pdf
Explore the Best of North India Shimla, Manali, Dalhousie, Delhi .pdfExplore the Best of North India Shimla, Manali, Dalhousie, Delhi .pdf
Explore the Best of North India Shimla, Manali, Dalhousie, Delhi .pdf
 
TOURISM -ATTRACTIONS- IN LESOTHO FOR YOU
TOURISM -ATTRACTIONS- IN LESOTHO FOR YOUTOURISM -ATTRACTIONS- IN LESOTHO FOR YOU
TOURISM -ATTRACTIONS- IN LESOTHO FOR YOU
 

Docker e postgresql

  • 1. Docker + PostgreSQL Fernando Ike – PGDay Campinas
  • 2.
  • 3. ● http://www.postgresql.org.br ● http://planeta.postgresql.org.br ● http://pgbr.postgresql.org.br
  • 4. Instalação ● Debian #aptitude install docker.io ● Ubuntu #apt-get install docker.io
  • 5. Install/Run ● Debian $docker run -d -p 5432:5432 fike/debian-postgresql:9.4-ptbr ● Ubuntu $docker run -d -p 5432:5432 fike/ubuntu-postgresql:9.4-ptbr1
  • 6. Entrando no PostgreSQL $CONTAINER_PG=$(docker ps -q) $docker run -i -t --net="container:$CONTAINER_PG" fike/debian-postgresql:9.4-ptbr /bin/bash $psql -U postgresql -h 127.0.0.1 -W “foobar”
  • 7. Logs $CONTAINER_PG=$(docker ps -q) $docker logs -f $CONTAINER_PG $docker run -i -t --net="container:$CONTAINER_PG" fike/debian-postgresql:9.4-ptbr tail -f /var/log/postgresql/postgresql-9.4-main.log
  • 8. Links ● https://registry.hub.docker.com/u/fike/ubuntu-postgresql/ ● https://registry.hub.docker.com/u/fike/debian-postgresql/ ● https://docs.docker.com/examples/postgresql_service/ ● https://groups.google.com/forum/#!forum/docker-users-br ● http://www.docker.io
  • 9. Contato ● Site: http://www.fernandoike.com ● Email: fike at midstorm.org ● Twiter: @fernandoike ● Linkedin: https://www.linkedin.com/in/fernandoike