News Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Blackfire.io Blog:
How Blackfire leverages Docker
May 01, 2015 @ 10:08:34

The Blackfire.io PHP debugging service (from SensioLabs) has a new post to thier blog today talking about how the service makes use of Docker to build the environments for testing out their users' code.

As you may know, Blackfire was represented at the SymfonyLive conference in Paris. During this event, several people came to us and asked how we use Docker at Blackfire.io. One of our goals is to make profiling straightforward for anyone, and it means that we need to be able to easily test our product on a lot of different platforms. And Docker gives us the ability to spin up new containers in milliseconds.

Moreover, our website relies a lot on different tools, so containers can also help us reach an iso-production development environment. But Docker is only available on Linux and a big part of the Blackfire's team is using MacOS X. So how one using MacOS X can use the best of both worlds?

The post goes on to talk about their use of the boot2docker tool and how they can use it to help with the environment customization most developers want out of their testing. They show how it updates the network settings, works with file sharing, allows for multiple domain names/containers and solutions to some other common issues including no container access, no name resolution and a "bonus" section with a Skydock plugin for custom DNS naming.

0 comments voice your opinion now!
blackfireio docker example common issue boot2docker

Link: http://blog.blackfire.io/how-we-use-docker.html

Vincent Composieux:
Run a Symfony application using Docker and docker-compose (English)
April 30, 2015 @ 10:53:48

Vincent Composieux has put together a new tutorial showing you how to get a Symfony2 application up and running inside of a Docker virtual machine for development and testing.

Why boot a full virtual machine when you can only run Docker containers of what you need to develop your Symfony applications ? This is one question asked by Jeremy Derusse at his "Docker dans le développement l'intégration continue" talk during Symfony Live Paris 2015. Those slides are really interesting, I invite you to take a look. They demonstrate the power of Docker and docker-compose but are waiting for practice in order to well understand. So I enjoyed a rainy week-end for further study!

He then outlines the components needed for a simple Symfony2 application: Nginx, PHP (well, PHP-FPM), MySQL and, of course, the code for the application. He includes the full contents for the "docker-compose.yml" configuration file to generate this Docker instance. He walks through each of the components it requires and talks about what they contain and how to define each of them as an image. Following this, he creates the containers with a "docker build" and brings it all up and working with one "docker up" command. He also includes a few other helpful commands for getting memory/CPU usage as well as removing all containers and images with a single command.

0 comments voice your opinion now!
symfony2 application docker tutorial dockercompose nginx mysql phpfpm

Link: http://vincent.composieux.fr/article/run-a-symfony-application-using-docker-and-docker-compose

Semaphore CI Blog:
Deploying PHP Applications with Rocketeer and Docker
April 10, 2015 @ 11:52:08

The Semaphore CI blog has a new tutorial showing you how to use Rocketeer and Docker to deploy PHP applications, pushing the resulting application out into a Docker container.

Deploying web applications is an integral part of modern web development. From this need, many tools have emerged to make the process as easy as possible. Rocketeer is heavily influenced by Capistrano and Laravel's principle of elegant code. It strives to make the deployment process accessible for everyone. [...] We'll deploy a fresh Laravel installation to a running Docker instance. This enables us to focus on setting up and using Rocketeer while the Docker instance will act as an application server requiring zero configuration and a great environment to experiment with.

They start with a list of requirements you'll need before getting started including Docker running on the server and Composer. They help you get Rocketeer installed and using the Docker command line too to set up and configure the server. Next up they show you how to use the "rocketeer" command to configure the Laravel application to be deployed. Once configured, they show you what updates you'll need to make and, finally, how to run the deployment. They also "dig deeper" and look at the file system setup on the server, stages of deployment, tasks, strategies and plugins.

0 comments voice your opinion now!
tutorial deploy laravel application rocketeer docker instance

Link: https://semaphoreci.com/community/tutorials/deploying-php-applications-with-rocketeer-and-docker

Cody Kennedy-Darby:
Testing Your Current Code Against PHP7 Or HHVM
April 01, 2015 @ 08:49:11

On Medium.com Cory Kennedy-Darby has a quick post showing you how you can test your current code against the latest versions of PHP 7 with the help of DUnit.

DUnit (dee-unit) makes your life easier by allowing you to run your unit tests on different versions of PHP or HHVM. Different versions are possible by using Docker containers. Thanks to @danbruce each of the Docker containers are only, ~35 MB in size. [...] PHP7 isn't that far away. In fact, it is scheduled for release in ~8 months in November. Now is the perfect time to start testing your code against PHP7 nightly.

He starts with a few reasons you might want to test your code and things you can do to start "thinking forward" to when it is released. He then shows you how to install DUnit (more detail here) and use it to test on both PHP 7 and HHVM builds.

0 comments voice your opinion now!
nightly test unittest build dunit docker container php7 hhvm

Link: https://medium.com/@ckdarby/testing-your-current-code-against-php7-or-hhvm-2f0ab059af78

Remi Collet:
PHP-FPM in Docker
December 12, 2014 @ 11:57:35

Remi Collet has a new post today showing you how to get PHP-FPM up and running with Docker using a few simple lines in the Dockerfile. Docker is a toolset that lets you easily create and provision containers with scripted configurations (and link them together).

[The] use case [for this is] running php 5.3.3 on a Fedora 20 / 21 development workstation, for production deployment on RHEL-6 (as no php 5.3 SCL exists). This example can be easily adapted for all available PHP versions available as RPM (5.3.3 in RHEL-6, 5.4.16 in RHEL-7, 5.4.16 and 5.5.6 in RHSCL 1.2 or using a third party repository).

The contents of the Dockerfile are included, making a call to yum to install all the needed packages, make a few replacements in the www.conf configuration file and create the default "www" directory. Finally, it fires up the PHP-FPM server with the IP given in the startup. The commands to create the container and launch it are also included in the post.

0 comments voice your opinion now!
tutorial phpfpm docker container create configure

Link: http://blog.famillecollet.com/post/2014/12/11/PHP-FPM-in-Docker

Dutch Web Alliance:
Docker & PHP beyond virtual machines
November 13, 2014 @ 13:09:21

On the Dutch Web Alliance site there's a recent post from Michael Rook introducing you to using Docker with PHP. Docker is a configurable system allowing you to script the creation and setup of an environment, piecing software and components together in an easy, reproducible way.

Docker is currently one of the hottest technologies around, because it solves a very specific problem: the ability to easily package and deploy a (self contained) application, without the overhead of traditional virtualization solutions. In this post you'll learn how to build, run and host Docker containers, integrate with other containers, and see how Vagrant interacts with Docker.

The post walks you through the steps you'll need to get an instance up and running with PHP setup and configured:

  • Installing Docker
  • Creating and starting a container
  • Dependencies: linking containers
  • Using Docker & Vagrant

In the end, you'll have a virtual instance and environment with PHP installed. All commands and configuration/code needed is included in the post.

0 comments voice your opinion now!
virtual machine docker tutorial introduction vagrant

Link: https://dutchweballiance.nl/techblog/docker-and-php-beyond-virtual-machines/

Andreas Gohr:
Docker PHP Farm
February 03, 2014 @ 10:05:19

In his latest post Andreas Gohr shares a platform he's developed using docker to create a multi-PHP version instance that can run locally with just a few commands.

Yesterday I tried to fix a bug a user had reported in one of my DokuWiki plugins. Apparently it only occurred on PHP 5.2. Well, the last PHP 5.2 version was released in 2011 and no modern distribution has it anymore. So how do I test this easily? After a few failed attempts with finding a virtual machine image that would give me the needed PHP version I decided to come up with my own solution. And because I was curious - I decided to build it on docker.

He's already done the hard work for you and created the "phpfarm" project that's easy to pull in and use. He includes the two commands to get it downloaded and up and working and running PHP versions 5.2 through 5.5 on ports 8052 to 8055. If you're interested in seeing his Dockerfile, check it out on Github.

0 comments voice your opinion now!
docker phpfarm version multiple container

Link: http://www.splitbrain.org/blog/2014-02/02-docker_phpfarm


Community Events

Don't see your event here?
Let us know!


configure library example opinion community application series framework podcast api conference php7 language symfony2 interview introduction release composer laravel performance

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework