php-fpm-laravel icon indicating copy to clipboard operation
php-fpm-laravel copied to clipboard

additional php extensions

Open sprklinginfo opened this issue 4 years ago • 3 comments

Hello, Thanks for the amazing job! I used this image a lot for my local dev. I need some additional PHP extensions, like mailparse, is there a simple way to install them with this image, or I need to build it with my own dockerfile? Thank you for your help!

sprklinginfo avatar Feb 10 '21 19:02 sprklinginfo

Same issue, I want to use it in GitLab to "composer install" my project, but I need mcrypt extension. I don't want to build a custom image if possible.

bertalanimre avatar Nov 03 '21 10:11 bertalanimre

I simply copied the Dockerfile of this repo and adjusted it to my needs; e.g. adding nginx. I suggest you do the same, and in the process, remove a lot of the unneeded php extensions

simplenotezy avatar Nov 08 '21 14:11 simplenotezy

Hey @sprklinginfo @bertalanimre thanks for your issue and comments. If you are using this image for development you could run a makefile within your project to install extra packages once the image has been pulled down for your needs.

@simplenotezy We don't intend on adding apache or nginx to this image as we run nginx as a separate container within our local environment. Below is an example of a docker-compose file that we use.

version: '3'
services:
  nginx:
    image: nginx:alpine
    container_name: webserver
    restart: unless-stopped
    tty: true
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - ./:/var/www
      - ./nginx/conf.d/:/etc/nginx/conf.d/
    networks:
      - network
  php-fpm:
    container_name: project_php
    image: cyberduck/php-fpm-laravel:7.4
    volumes:
      - ./:/var/www/
    networks:
      - network
    depends_on:
      - nginx
networks:
  network:
    driver: "bridge"

worzy avatar Nov 16 '21 18:11 worzy