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

Not working ImageMagick in workspace with php 7.* #2850

Closed
inguldima opened this issue Mar 1, 2021 · 3 comments
Closed

Not working ImageMagick in workspace with php 7.* #2850

inguldima opened this issue Mar 1, 2021 · 3 comments

Comments

@inguldima
Copy link

inguldima commented Mar 1, 2021

Is your feature request related to a problem? Please describe.
Not working ImageMagick in workspace with php 7.*

Describe the solution you'd like
Change this piece of code in workspace/Dockerfile

RUN if [ ${INSTALL_IMAGEMAGICK} = true ]; then \
    apt-get install -y imagemagick php-imagick \
;fi

to this

RUN if [ ${INSTALL_IMAGEMAGICK} = true ]; then \
    apt-get update \
    && apt-get install -y --force-yes imagemagick php-imagick \
    && apt-get install -y libmagickwand-dev --no-install-recommends \
    && rm -rf /var/lib/apt/lists/* \
    && pecl install imagick \
;fi
@ideepblue
Copy link

I encountered the same issue.

The latest workspace image laradock/workspace:latest-7.3 only installed imagick that work for php8.0.

The solution @inguldima provided is incomplete. I still need to create imagick config in /etc/php/7.3/cli/conf.d by run the command ln -s /etc/php/8.0/mods-available/imagick.ini.

@aconital
Copy link

aconital commented Mar 8, 2021

I'm using PHP 7.2 and I'm having the same issue. The extension is no longer being installed on workspace.
I ended up doing this which is very ugly and hacky:

USER root
RUN apt-get update && \
    apt-get update \
        && apt-get install -y --force-yes imagemagick php-imagick \
        && apt-get install -y libmagickwand-dev --no-install-recommends \
        && rm -rf /var/lib/apt/lists/* \
        && pecl install imagick \
        && ln -s /etc/php/8.0/mods-available/imagick.ini /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/20-imagick.ini

@bestlong
Copy link
Member

#2862
pull new source and build again

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

No branches or pull requests

4 participants