Skip to content

Add PHP extension on initial container startup possible? #260

Closed

Description

@Commifreak

Hey,

thanks for your solutions!

I have an application that needs soap, so I ran phpaddmod via console, which worked. However, is there any way to tell the container to install a php-mod, if its not already installed? soap is not shipped by default and I dont want to create a new image just for that one extension. A ENV option for that would be awesome, I think?

Thanks!

Activity

  1. shinsenter commented on Jul 18, 2025

    @shinsenter
    Owner

    @Commifreak

    Hi there! I understand your project needs the SOAP extension, which unfortunately isn't available by default.

    At the moment, there's no way to install the extension automatically without rebuilding the Docker image.

    That said, I wouldn't really recommend doing so, as it could slow down your deployments, affect CI/CD processes or health checks, and might even lead to unnecessary costs for container services.

  2. shinsenter commented on Jul 18, 2025

    @shinsenter
    Owner

    @Commifreak

    However, the Docker images I provide include a mechanism called “hooks”, which isn't documented.

    You can mount a script file to install SOAP at the path /etc/hooks/onboot/, for example: /etc/hooks/onboot/install-soap.

    I hope this mechanism can be helpful in your case.

  3. Repository owner locked and limited conversation to collaborators on Jul 18, 2025
  4. converted this issue into a discussion #261 on Jul 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions