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

Colin O'Dell:
Testing PHP 7.2 With Docker
Jul 07, 2017 @ 16:58:07

Colin O'Dell has posted a guide that you can follow to help you test your applications with the latest version of the PHP 7.2 pre-releases using a simple Docker setup.

PHP 7.2 is slated for release in November 2017, but you don't have to wait until then to start testing your applications! We can easily use Docker to test against the latest pre-release versions of 7.2.

He's even created a Docker image that's posted on DockerHub to make the process even simpler. He shows how to reference specific types (php-fpm, apache, etc) and specific tags for the PHP pre-releases on each. He encourages you to log bugs in the PHP if found and report issues to him if there's a problem with the Docker setup. He also mentions that, since the mcrypt extension was removed by default from PHP 7.2, you'll need some special commands to get it set up and working (via a PECL install).

tagged: testing php72 prerelease version docker image dockerhub

Link: https://www.colinodell.com/blog/201707/testing-php-72-docker

Hackernoon.com:
Laravel in Docker
May 05, 2017 @ 17:13:32

On the Hackernoon.com site they've posted a tutorial showing you how to set up a Docker image of a Laravel application to help speed up your development using the framework and standardize the environment it lives in.

With this article you’ll learn how to prepare a Docker image of a Laravel application, push it to the registry, and use Docker in Continuous Delivery.

The post starts with a brief introduction of the two technologies at play, the Laravel framework and Docker, and what they provide. The tutorial then walks you through the entire process of setup, configuration and deployment of the Docker image:

  • Install Docker
  • Write a Dockerfile (including the install of Laravel)
  • Build Docker image (and Run)

At this point you have the image set up and ready to serve Laravel requests so they move on to sharing the image out on a Docker registry. In this case they opt to deploy it to hub.docker.com and use the login and push commands to quickly and easily share your creation. Finally they provide some use cases for this kind of deployment including creating standard development environments, using them for testing and keeping a consistent environment between development, staging and production.

tagged: laravel framework docker tutorial configure deploy dockerhub environment

Link: https://hackernoon.com/laravel-in-docker-ceed4465352

Mattias Noback:
Containerizing a static website with Docker, part III
Jan 09, 2017 @ 17:48:46

Matthias Noback has posted the third part of his "containerizing a static website with Docker" service, continuing on from his previous two posts to look at deploying the environment he's created.

In the previous posts we looked at creating a build container, and after that we created a blog container, serving our generated static website.

It's quite surprising to me how simple the current setup is — admittedly, it's a simple application too. It takes about 50 lines of configuration to get everything up and running.

The idea of the blog container, which has nginx as its main process, is to deploy it to a production server whenever we feel like it, in just "one click". There should be no need to configure a server to host our website, and it should not be necessary to build the application on the server too. This is in fact the promise, and the true power of Docker.

He then gets into the two remaining steps in the process resulting in the deployment of the simple application: pushing to Docker Hub and deploying out to a DigitalOcean server. He includes all of the commands and configuration you'll need to get the process set up and work with the remote machine.

tagged: docker series container part3 deploy dockerhub digitalocean

Link: https://php-and-symfony.matthiasnoback.nl/2017/01/containerizing-a-static-website-with-docker-part-iii/


Trending Topics: