I started with Docker Desktop for Windows rather successfully - I’d say.
I need to build a project that is / will be based on a WordPress backend (for now) and I have tried out the official WP image.
It worked surprisingly well - but I’m not too happy, nevertheless.
The PHP version is 7.4, SSL support is possible but as I don’t really have obvious access to the built-in Apache somewhat complicated - and I have to add PhpMyAdmin anyhow I figured I’d try something different and would be grateful for pointers from the experts.
[ Background Info: I’m not a Linux admin at all but am not afraid of the cli. The purpose of using docker for the project however is to collaborate with colleagues that are even less of a Linux-admin than me.
I’m ok with the administration of my local Apache servers on Windows and Mac and also tinker with the occasional configurations of hosted servers. But I really would like not to have to invest time in server support.]
To get a feeling of how to best work with docker I would like to do most of the configuration with composer yaml files and I’m trying to find a way to setup an image with PHP, PhpMyAdmin, Maria DB and Apache on Docker Desktop for windows. (I’m not sure if that is a good idea, but I would think that mounting php-extension -folder as well as Apache config on the host systems would be profitable)
I’m running wsl2 and I installed Ubuntu there and made Docker Desktop use it - as I had lots of trouble getting my volumes mounted on windows.
And I read somewhere that this would help. It did not immediately, but I finally have it working (somehow) meaning the da files and the installation finally showed up in my project sub directories as specified, but the volumes now are not to be found in Docker Desktop… - so I’m really experimenting, and the web provides outdated and contradictory help.
The mounting of volumes in composer cost me lot of time, and I’m still not 100% sure if I have it right.
My goal would be to configure the aforementioned setup in a composer file, finetune it, test in on Windows and Mac and finally deliver the container to my teammates. Finetuning a lot on the cli after composition of the container is something I’d like to avoid as much as possible.
I can and will do my trial-and-error work, but I somehow feel that the examples in the composer documentation often are extremely basic and lack context. The quick start examples also don’t show a lot about how to configure the images included (e.g. with extensions) so if someone has examples with a little explanation attached, I would be incredibly grateful.
(And btw. unpacking a wp-zip into a www folder and setting config.php is something I do not need an image for, even if it is nice to see how it works, it might even be that in the end we do not need/use wp.)
Thank you for reading.