I often use local Docker images for development reasons, and sometimes, I need to implement features that only works in HTTPS environment: i.e. JWT Bearer token.
So, I prepared a Docker container based on official PHP Apache2 Docker container, that quickly setup HTTPS environment with a self-signed certificate.
Follows a starting docker-compose structure that you can be extended as needed. It contains only 2 files:
docker-compose.yml
apache2/Dockerfile
Let’s see file content.
docker-compose.yml:
|
|
apache2/Dockerfile:
|
|
Quick & dirty.
I hope it can be useful.