Skip to content

Instantly share code, notes, and snippets.

View johndatserakis's full-sized avatar

John Datserakis johndatserakis

View GitHub Profile
@johndatserakis
johndatserakis / docker-cleaning.sh
Last active May 3, 2020 20:11
Bash command to clean unused docker images and solve the max depth exceeded error.
# Getting a "max depth exceeded" error in your docker-compose file? Run these commands to clean our your docker install.
# Stop all running containers
docker stop $(docker ps -aq)
# Delete all docker containers
docker rm $(docker ps -a -q)
# Delete all docker images
docker rmi $(docker images -q)
@johndatserakis
johndatserakis / install-imagick-docker-php-7-1-alpine.md
Last active August 5, 2024 06:22
Install imagick In Docker FROM php:7.1-fpm-alpine

docker-library/php#105

RUN set -ex \
    && apk add --no-cache --virtual .phpize-deps $PHPIZE_DEPS imagemagick-dev libtool \
    && export CFLAGS="$PHP_CFLAGS" CPPFLAGS="$PHP_CPPFLAGS" LDFLAGS="$PHP_LDFLAGS" \
    && pecl install imagick-3.4.3 \
    && docker-php-ext-enable imagick \
    && apk add --no-cache --virtual .imagick-runtime-deps imagemagick \
 && apk del .phpize-deps