Is there a way to do this without the volumes? I've been researching for days and people on stack overflow are telling me it's possible when you update the fastcgi file to direct to the php-fpm container properly. Without the volume in each container I get 404 and 502 errors. Surely there's a way to do this without the volumes to keep those truly containerised? My setup is basically just like yours.
Sure, instead of using bind mounting (volumes) from docker compose , you may simply copy files during the build process in separate Dockerfile for each service . So instead of doing image: php:fpm-alpine, you should create a Dockerfile and build it from that dockerfile. I think i will make some video on this topic soon
Thanks for the video! I have a task creating php-apache container(php8.1 apache2.4), so i used base image php:8.1-apache, then I was asked to add a php-fpm feature in the same dockerfile. I added a line RUN apt update && apt install -y php-fpm, but it didn't work since my php version is 8.1 and the php-fpm package inside of container was 8.2. I was told use php8.1 version but I couldn't find a php-rpm8.1 package.. any idea? I don't know if this approach is right since I'm very new to docker.
Is there a way to do this without the volumes? I've been researching for days and people on stack overflow are telling me it's possible when you update the fastcgi file to direct to the php-fpm container properly.
Without the volume in each container I get 404 and 502 errors. Surely there's a way to do this without the volumes to keep those truly containerised?
My setup is basically just like yours.
Sure, instead of using bind mounting (volumes) from docker compose , you may simply copy files during the build process in separate Dockerfile for each service . So instead of doing image: php:fpm-alpine, you should create a Dockerfile and build it from that dockerfile. I think i will make some video on this topic soon
Thanks for the video!
I have a task creating php-apache container(php8.1 apache2.4), so i used base image php:8.1-apache, then I was asked to add a php-fpm feature in the same dockerfile. I added a line RUN apt update && apt install -y php-fpm, but it didn't work since my php version is 8.1 and the php-fpm package inside of container was 8.2. I was told use php8.1 version but I couldn't find a php-rpm8.1 package.. any idea? I don't know if this approach is right since I'm very new to docker.
Please take a look here ruclips.net/video/Z1nFb4kvuJk/видео.html