Trouble adding SES plugin to a Dockerfile (so I can build my own image)

Your software
My Mautic version is: 5.0.4
My PHP version is: 8.1
My Database type and version is: 8.0 mysql

Im trying to build my own docker images, since it appears you cannot install the Amazon SES plugin from the UI itself. I should mention I’ve got a stock Mautic running just find using the provided docker compose files, and I’m using the 5-apache variant behind a traefik2 proxy. No prob there.

I want to use the SES plugin, because the docs mention I can’t configure bounce handling since:

Some Email services overwrite the return-path header with that of the account’s Email (GMail, Amazon SES). In these cases, IMAP bounce monitoring won’t work.

Steps taken so far:

What I’ve done so far is clone GitHub - mautic/docker-mautic: Docker Image for Mautic.
I’ve then modified the apache example Dockerfile like so:

.... (use stable? not dev?) ....
# Define Mautic version by package tag
ARG MAUTIC_VERSION=^5.0

RUN cd /opt && COMPOSER_ALLOW_SUPERUSER=1 COMPOSER_PROCESS_TIMEOUT=10000 composer create-project mautic/recommended-project:${MAUTIC_VERSION} mautic --no-interaction

RUN rm -rf /opt/mautic/var/cache/js

RUN find /opt/mautic/node_modules -mindepth 1 -maxdepth 1 -not \( -name 'jquery' -or -name 'vimeo-froogaloop2' \) | xargs rm -rf

# *** This is the line I've added ***
# Add Amazon SES plugin

RUN cd /opt && COMPOSER_ALLOW_SUPERUSER=1 COMPOSER_PROCESS_TIMEOUT=10000 composer require pabloveintimilla/mautic-amazon-ses

FROM php:8.1-apache

COPY --from=builder /usr/local/lib/php/extensions /usr/local/lib/php/extensions

COPY --from=builder /usr/local/etc/php/conf.d/ /usr/local/etc/php/conf.d/
.... (continues)....

I’m new to php/composer. Not new to dev/docker.
Howver, when I build, I get this error:

Step 13/38 : RUN cd /opt && COMPOSER_ALLOW_SUPERUSER=1 COMPOSER_PROCESS_TIMEOUT=10000 composer require pabloveintimilla/mautic-amazon-ses:^1.0.2
 ---> Running in 7b092418a272
./composer.json has been created
Running composer update pabloveintimilla/mautic-amazon-ses
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - mautic/core-lib[5.0.0, ..., 5.0.4] require friendsofsymfony/oauth-server-bundle dev-upgrade-2 -> found friendsofsymfony/oauth-server-bundle[dev-master, 1.0.0, ..., 1.7.x-dev, 2.0.0-alpha.0, 2.0.x-dev (alias of dev-master)] but it does not match the constraint.
    - pabloveintimilla/mautic-amazon-ses v1.0.2 requires mautic/core-lib ^5.0 -> satisfiable by mautic/core-lib[5.0.0, ..., 5.0.4].
    - Root composer.json requires pabloveintimilla/mautic-amazon-ses ^1.0.2 -> satisfiable by pabloveintimilla/mautic-amazon-ses[v1.0.2].


Installation failed, deleting ./composer.json.
The command '/bin/sh -c cd /opt && COMPOSER_ALLOW_SUPERUSER=1 COMPOSER_PROCESS_TIMEOUT=10000 composer require pabloveintimilla/mautic-amazon-ses:^1.0.2' returned a non-zero code: 2

I’ve tried specifying ^1.0.2 (as you can see above), or not, for the ses plugin version. No change to install behaviour. I’ve NOT tried installing as an actual service on bare metal, as that’s not really something I want to do in the long run.

I’m hoping to have a “simple” method to repetably build an SES capable image.

My fork is: GitHub - scornflake/docker-mautic: Docker Image for Mautic

Am I going about this the right way?

I ran into similar issue with my plugin. I’m not sure if the version of friendsofsymfony/oauth-server-bundle[dev-upgrade-2] is correct. @escopecz could you have a look?

I don’t use SES so I’m not sure what version or plugin is the right one. I know that there are several for M5.

I have my own issues with plugin installation in Docker:

Sorry, I was not precise. This problem will affect any plugin that depends on mautic/core-lib. I believe that the dev-upgrade-2 version of the oauth-server-bundle specified in mautic/core-lib may no longer exist.