ERROR: unsatisfiable constraints
hello tomazzaman, thanks for your article. help me a lot. There is an error where I run
docker-compose build
the error happend
ERROR: unsatisfiable constraints:
mysql-client (missing):
required by: world[mysql-client]
ERROR: Service 'wordpress' failed to build: The command '/bin/sh -c apk add --no-cache nginx mysql-client supervisor curl bash redis imagemagick-dev' returned a non-zero code: 1
thanks for your help :-)
I inserted 'apk update ' in the Dockerfile. This does the trick for me.
# We need these system-level scritps to run WordPress successfully RUN apk update \ apk add --no-cache nginx mysql-client supervisor curl \ bash redis imagemagick-dev libpng-dev curl-dev libxml2-dev
I have the same problem. apk update didn't do a trick, I mean it does for this step, but it fails later on - I've got this error message:
configure: error: png.h not found. ERROR: Service 'wordpress' failed to build: The command '/bin/sh -c apk add --no-cache libtool build-base autoconf && docker-php-ext-install -j$(grep -c ^processor /proc/cpuinfo 2>/dev/null || 1) iconv gd mbstring fileinfo curl xmlreader xmlwriter spl ftp mysqli opcache && pecl install imagick && docker-php-ext-enable imagick && apk del libtool build-base autoconf' returned a non-zero code: 1
After changeing the Dockerfile as follows it works for me on Debian 9 as docker host. To find out which package should be installed have look to https://pkgs.alpinelinux.org/packages and search for -dev packages like *ssh*-dev
FROM php:7.0.6-fpm-alpine
MAINTAINER Tomaz Zaman <[email protected]>
# We need these system-level scritps to run WordPress successfully
RUN apk --repository http://dl-3.alpinelinux.org/alpine/v3.6/community/ \
--repository http://dl-3.alpinelinux.org/alpine/v3.6/main/ \
--update \
add --no-cache nginx mysql-client supervisor curl \
bash redis imagemagick-dev libpng-dev curl-dev libxml2-dev libssh2-dev
# As per image documentation, this is how we install PHP modules
RUN docker-php-ext-install -j$(grep -c ^processor /proc/cpuinfo 2>/dev/null || 1) \
iconv gd mbstring fileinfo curl xmlreader xmlwriter spl ftp mysqli opcache
# Install imagemagick for PHP
RUN apk --repository http://dl-3.alpinelinux.org/alpine/v3.6/community/ \
--repository http://dl-3.alpinelinux.org/alpine/v3.6/main/ \
add --no-cache libtool build-base autoconf \
&& pecl install imagick \
&& docker-php-ext-enable imagick \
&& apk del libtool build-base autoconf