Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker composer is in bin but not working #274

Open
brianroyce opened this issue Apr 16, 2024 · 1 comment
Open

Docker composer is in bin but not working #274

brianroyce opened this issue Apr 16, 2024 · 1 comment

Comments

@brianroyce
Copy link

So, the composer does not work on Docker, and you can not install Symfony Transports. However, it is not working, and I cannot update the container. Would you happen to have any updates on this? I discovered this issue because I was trying to get Sendgrid set up. I was using Portainer to run this, but I can't get Symfony to install it.

@O-Mutt
Copy link

O-Mutt commented Jul 19, 2024

For what it's worth this is where I am at on similar work:

You would create a new Dockerfile and set the docker-compose (if you're using compose) to build it

FROM mautic/mautic:5-fpm

RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer

RUN apt-get update \
    && apt-get install --no-install-recommends -y \
    git \
    nodejs \
    npm

# install your symfony transport here
RUN cd /var/www/html && \
    COMPOSER_ALLOW_SUPERUSER=1 COMPOSER_PROCESS_TIMEOUT=10000 composer require symfony/amazon-mailer

RUN rm -rf /var/www/html/var/cache/js && \
    find /var/www/html/node_modules -mindepth 1 -maxdepth 1 -not \( -name 'jquery' -or -name 'vimeo-froogaloop2' \) | xargs rm -rf

# clean up apt installed git node npm
RUN apt-get remove -y git nodejs npm

# cleanup apt cache
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# cleanup composer and composer cache
RUN rm -rf /root/.composer

# remove composer
RUN rm -rf /usr/bin/composer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants