Skip to content

Instantly share code, notes, and snippets.

@buth
Last active Nov 9, 2022
Embed
What would you like to do?
Docker Install ImageMagick
RUN \
curl -sfLO http://www.imagemagick.org/download/ImageMagick-6.9.0-4.tar.gz && \
echo 'cf51a1c6ebf627c627a8e6ac20aecce5f1425907c2cdb98c5a60f329c5c6caf2 ImageMagick-6.9.0-4.tar.gz' | sha256sum -c - && \
tar -xzf ImageMagick-6.9.0-4.tar.gz && \
cd ImageMagick-6.9.0-4 && \
./configure --prefix /usr/local && \
make install && \
cd .. && \
rm -rf ImageMagick*
@si-m
Copy link

si-m commented Jan 26, 2016

Service 'web' failed to build: The command '/bin/sh -c curl -sfLO http://www.imagemagick.org/download/ImageMagick-6.9.0-4.tar.gz && echo 'cf51a1c6ebf627c627a8e6ac20aecce5f1425907c2cdb98c5a60f329c5c6caf2 ImageMagick-6.9.0-4.tar.gz' | sha256sum -c - && tar -xzf ImageMagick-6.9.0-4.tar.gz && cd ImageMagick-6.9.0-4 && ./configure --prefix /usr/local && make install && cd .. && rm -rf ImageMagick*' returned a non-zero code: 22

@wrkhenddher
Copy link

wrkhenddher commented Jan 22, 2018

I my case, I resolved similar errors by making sure the initial image had curl, tar, xz-utils, build-essential, etc.

# https://hub.docker.com/r/starefossen/node-imagemagick/~/dockerfile/
# with modifications

FROM ubuntu:16.04
...
RUN apt-get update -y \
    && apt-get install -y curl tar file xz-utils build-essential

RUN \
  curl ...

@shuuny-matrix
Copy link

shuuny-matrix commented Apr 25, 2018

Are you using these command in ubuntu terminal or inside the docker container shell?

@armourjami
Copy link

armourjami commented Feb 7, 2019

Service 'web' failed to build: The command '/bin/sh -c curl -sfLO http://www.imagemagick.org/download/ImageMagick-6.9.0-4.tar.gz && echo 'cf51a1c6ebf627c627a8e6ac20aecce5f1425907c2cdb98c5a60f329c5c6caf2 ImageMagick-6.9.0-4.tar.gz' | sha256sum -c - && tar -xzf ImageMagick-6.9.0-4.tar.gz && cd ImageMagick-6.9.0-4 && ./configure --prefix /usr/local && make install && cd .. && rm -rf ImageMagick*' returned a non-zero code: 22

The url couldn't resolve, the file http://www.imagemagick.org/download/ImageMagick-6.9.0-4.tar.gz no longer exists. To see a list of available files go to http://www.imagemagick.org/download/ So for example I found http://www.imagemagick.org/download/ImageMagick-7.0.8-26.tar.gz and works without error.

@DenisBalan
Copy link

DenisBalan commented Mar 31, 2020

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