Tuesday, May 19, 2015

Build caching Community Container Containers course Des-sobrinhação Docker job Meetings Events stag


In the previous article we discuss two ways to build a container, some tips for assembly and use. Now we wonder we set up a "containerzão" with all the services that my application needs to run or set up several "containerzinhos" one for each application service.
When you are working on a full application coupled services like bank, memory, elastic search and other services just putting everything on the same Virtualbox, or even Vagrant, why we go up a VM for each service our host machine goes to Goiás. All time will be catching and something.
Docker with the picture changes, we climb several container on the same machine and called them our way on the same network. For example we have a web server that should communicate directly with a database server, then they should see themselves within the network.
If we enter the container "web" we can access the container "mysql" as if they were two servers on the same network: $ docker exec wfsilva -ti / nginx php-fpm-docker-bash # mysql ping localhost PING (172.17.0.5): 48 data bytes 56 bytes from 172.17.0.5: icmp_seq = 0 ttl = 64 time = 0.064 ms 56 bytes from 172.17.0.5: icmp_seq = 1 ttl = 64 time = 0.125 ms 56 bytes from 172.17.0.5: icmp_seq = 2 ttl = 64 team = 0092 ms 56 bytes from 172.17.0.5: icmp_seq = 3 ttl = 64 time = 0.096 ms ^ C orchestration with Fig (Today internalized rcl tracking as Docker Compose)
The Fig is a face done in python that was invented to facilitate the use of several rcl tracking interconnected containers. He was internalized by Docker staff and now called docker-compose. He along with the docker-machine and the docker-swarm are the big news announced in DockerCon US in 2014 which took place in December 2014.
We now have the following options: rcl tracking $ curl -L https://github.com/docker/compose/releases/download/1.1.0/docker-compose-`uname -s`-`uname -m`> / usr / local / bin / docker-compose $ chmod + x / usr / local / bin / docker-compose
With fig / docker-compose all containers that run its application are described in a yml file where the main we are the containers and the nodes within each container represent their properties.
The web container will build from a dockerfile that steja located on the same path where the file is docker-compose.yml. Will run the run.sh when you start. Will map port 80 to port 80 of the docker host, this way we can access it as if it were a local service through the ip 127.0.0.1. Will mount the directory that is inside rcl tracking the / src in the container rcl tracking and will connect with the mysql container.
To raise the entire group use the up parameter that besides up the containers will show the logs of all containers on the screen. Finally rcl tracking just take a ctrl + c. Or start the -d parameter that will not show the logs on the screen. $ Fig up -d $ # or $ docker-compose up -d
In this container it maps the /var/run/docker.sock the docker rcl tracking host to /tmp/docker.sock inside the container. The container also has a binary forego a script that monitors go this mapped rcl tracking file /tmp/docker.sock and for changes rcl tracking it uses the docker-gen to rebuild a nginx.conf, based on a template file.
What do you think of a yml this: Proxy: build: ./proxy volumes: - /var/run/docker.sock:/tmp/docker.sock ports: - "80:80" pens: build: ./redis privileged: true volumes: - ./redis:/data ports: - "6379: 6379" entrypoint: redis-server rabbit: rcl tracking image: tutum / RabbitMQ environment: - RABBITMQ_PASS = ports test: - "5672: 5672" - "15672: 15672" solr: build: ./solr rcl tracking privileged: true volumes: - ./src/solr:/src/solr ports: - "8983: 8983" entrypoint: /start-solr.sh mysql: build: ./mysql privileged: true ports - "3306: 3306" environment: - MYSQL_ROOT_PASSWORD test = - = MYSQL_USER test - test MYSQL_PASSWORD = - = MYSQL_DATABASE teste_db web: build: ./web environment: - virtual_host = teste.dev links: - pens: pens - rabbit: rabbit - solr: solr - mysql: rcl tracking mysql privileged: true volumes: - ./src:/src ports: - "80" entrypoint: /run.sh
The_wsilva is a quiet guy, worker like technology, IT, telecom, football, good music, pizzas (much), travel, aircraft, motorcycles, cooking and especially likes the family and friends. Virtually degree in information systems at USP, ZCE PHP 5.3, speaks English, German risks.
Recent rcl tracking articles Community Notices Why VIM? PHP Experience 2015 Docker, Beginning the orchestration and clustering - 4. Orchestration Docker, Beginning the orchestration and clustering - 3. Mounting Containers
Build caching Community Container Containers course Des-sobrinhação Docker job Meetings Events stage Fig Hub linux microsoft rcl tracking opportunity PHP php-sp-blogs php 5.3 phpconfbr phpconference PHPSP PHPSPCast phpsptestfest phptestfest09 phpubsp phpunconfbr PostgreSQL developer promotion review Smarty seminariophp security rcl tracking sao paulo TestFest work t

No comments:

Post a Comment