Shiphp The PHP Developer's Guide to Docker

Latest Blog Posts

File Uploads in PHP

A common function for most web applications is uploading and storing files from users. Doing this securely and reliably can be a challenge, but there are a couple options if you’re using PHP. 1. Use a File Upload Service If you want to ensure that your file uploads are securely and reliably stored no matter what web hosting environment you u... Read more

Type Hinting and Return Types in PHP 7

Many developers prefer strongly-typed languages, and critics have often dogged PHP because its weak typing opens users up to errors and vulnerabilities. While PHP is still a “weakly-typed” language (meaning variables can change types throughout the program’s lifecycle), PHP 7.0 sought to give developers more control over how they specify func... Read more

Running a PHP Web App in a Docker Container

If you’re familiar with the process for creating a simple website using PHP, then adding Docker to the mix should be relatively easy. The great thing about using Docker is that you have better portability over your code. Let’s look at a simple Docker command that will host a webpage written in PHP. Our PHP Script index.php Create a file cal... Read more

Running a PHP Script in a Docker Container

If you’re used to running PHP command line applications, adding Docker could be a great way to increase the reusability and portability of your scripts. Docker allows you to run your code in isolated containers rather than on the host machine directly, meaning that even if you don’t have the same version of PHP or extensions installed, you can... Read more

Announcing our First eBook on PHP and Docker

We are excited to announce the release of our first eBook, Building PHP Applications in Docker: A Step By Step Guide for PHP Developers Learning Docker. The book covers a wide range of topics including: Installing dependencies using Composer. Getting data from a third-party API. Saving data to a database. Using a web framework for rout... Read more