{"id":533,"date":"2025-01-31T11:42:50","date_gmt":"2025-01-31T02:42:50","guid":{"rendered":"https:\/\/kitayama.jp\/?p=533"},"modified":"2025-01-31T11:42:52","modified_gmt":"2025-01-31T02:42:52","slug":"imagemagick","status":"publish","type":"post","link":"https:\/\/kitayama.jp\/?p=533","title":{"rendered":"imagemagick"},"content":{"rendered":"\n<p>IMAGEMAGICK \u306edocker \u304c\u6025\u306b\u30a8\u30e9\u30fc\u306b\u306a\u308b\u306e\u3067\u3001\u4ee5\u4e0b\u306b\u5909\u66f4\u3057\u305f\u3002<\/p>\n\n\n\n<p>PHP 8\u306e\u5834\u5408\u3001\u30a8\u30e9\u30fc\u306b\u306a\u308b\u3053\u3068\u304c\u3042\u308b\u307f\u305f\u3044\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>ARG INSTALL_IMAGEMAGICK=false\nARG IMAGEMAGICK_VERSION=latest\nENV IMAGEMAGICK_VERSION ${IMAGEMAGICK_VERSION}\n\nRUN if [ ${INSTALL_IMAGEMAGICK} = true ]; then \\\n    apt-get update && \\\n    apt-get install -yqq libmagickwand-dev imagemagick && \\\n    if [ $(php -r &quot;echo PHP_MAJOR_VERSION;&quot;) = &quot;8&quot; ]; then \\\n      cd \/tmp && \\\n      if [ ${IMAGEMAGICK_VERSION} = &quot;latest&quot; ]; then \\\n        git clone https:\/\/github.com\/Imagick\/imagick; \\\n      else \\\n        git clone --branch ${IMAGEMAGICK_VERSION} https:\/\/github.com\/Imagick\/imagick; \\\n      fi && \\\n      cd imagick && \\\n      phpize && \\\n      .\/configure && \\\n      make && \\\n      make install && \\\n      rm -r \/tmp\/imagick; \\\n    else \\\n      pecl install imagick; \\\n    fi && \\\n    docker-php-ext-enable imagick; \\\n    php -m | grep -q &#39;imagick&#39; \\\n;fi<\/code><\/pre><\/div>\n","protected":false},"excerpt":{"rendered":"<p>IMAGEMAGICK \u306edocker \u304c\u6025\u306b\u30a8\u30e9\u30fc\u306b\u306a\u308b\u306e\u3067\u3001\u4ee5\u4e0b\u306b\u5909\u66f4\u3057\u305f\u3002 PHP 8\u306e\u5834\u5408\u3001\u30a8\u30e9\u30fc\u306b\u306a\u308b\u3053\u3068\u304c\u3042\u308b\u307f\u305f\u3044\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/kitayama.jp\/index.php?rest_route=\/wp\/v2\/posts\/533"}],"collection":[{"href":"https:\/\/kitayama.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kitayama.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kitayama.jp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kitayama.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=533"}],"version-history":[{"count":1,"href":"https:\/\/kitayama.jp\/index.php?rest_route=\/wp\/v2\/posts\/533\/revisions"}],"predecessor-version":[{"id":534,"href":"https:\/\/kitayama.jp\/index.php?rest_route=\/wp\/v2\/posts\/533\/revisions\/534"}],"wp:attachment":[{"href":"https:\/\/kitayama.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=533"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kitayama.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=533"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kitayama.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=533"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}