A Docker image that aims to make your life easier, not a pain in the ass
522
A Docker image that aims to make your life easier, not a pain in the ass ... assuming you're running PHP on Apache (for now).
Add your Dockerfile:
FROM rawkode/php:kickass
Modify your docker-compose.yml
services:
my-kickass-app:
build:
context: .
If you need some additional system dependencies, they will be satisfied if you provide a packages.txt file in the root of your project.
vim
jq
If you need some additional PHP extensions, they will be satisfied if you provide a php-extensions.txt file in the root of your project.
pdo
mcrypt
Composer will be installed automatically and available within your image. If you have a composer.json, this image will automatically install your dependencies.
., so you can hide them.install command?services:
my-kickass-app:
build:
context: .
args:
FILE_PREFIX: .
COMPOSER_ARGS: --no-dev # Default
It's too short to be wasting your time dealing with this shit.
~ @rawkode
I do love an existential question! I started using Docker to make my life easier, not a pain in the ass. Currently PHP and Composer are separate "official" images and do not reflect how the PHP developer works with their code.
I had a bit of a rant on Twitter, so I decided to publish the Docker setup I use across my clients.
If somebody asks
It's simple, fast and Just Works ™. It fits well with the process model of Docker, rather than running an init system and fpm.
NB: I am investigating a Caddy version with fpm, though ... just for the funs.
Content type
Image
Digest
Size
164.1 MB
Last updated
over 9 years ago
docker pull rawkode/php