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

ERROR: unsatisfiable constraints #2

Open
febmark opened this issue Sep 1, 2017 · 3 comments
Open

ERROR: unsatisfiable constraints #2

febmark opened this issue Sep 1, 2017 · 3 comments

Comments

@febmark
Copy link

febmark commented Sep 1, 2017

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 :-)

@binabus
Copy link

binabus commented Sep 4, 2017

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

@yar-trach
Copy link

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

@binabus
Copy link

binabus commented Sep 6, 2017

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 <tomaz@codeable.io>

# 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

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

No branches or pull requests

3 participants