DEV Community

Discussion on: My Docker Setup For GatsbyJS (and NextJS)

Collapse
 
stuckj profile image
Jonathan Stucklen • Edited

Just a note for anyone else that reads this and runs into this error:

ERROR: unsatisfiable constraints:
  vips-dev (missing):
    required by: world[vips-dev]

This is because alpine recently moved the vips-dev package from edge/testing to edge/community. See this issue for some context on the sharp repo: github.com/lovell/sharp/issues/1733

To fix it, just change the repo URL in the post above from:
http://dl-3.alpinelinux.org/alpine/edge/testing to http://dl-3.alpinelinux.org/alpine/edge/community.

Also, I had to change the --no-cache in the second apk command to --update-cache as is suggested in one of the referenced PRs off the above issue. So, your full docker RUN command for APK installs would look like this (formatting changed):

RUN apk add --no-cache python make g++ \
 && apk add vips-dev fftw-dev build-base \
        --update-cache \
        --repository https://alpine.global.ssl.fastly.net/alpine/edge/community \
        --repository https://alpine.global.ssl.fastly.net/alpine/edge/main \
 && rm -fR /var/cache/apk/*

Hope that helps someone else. It had me stuck for a while. :-P

In addition, yarn fails for me with the latest node (for alpine or otherwise). So, I also had to change the FROM line to fix it to the latest v8. E.g.,

FROM node:8-alpine
Collapse
 
gustavorglima profile image
Gustavo Lima

Here does not Work! Need to change python to python3. E.g.:

RUN apk add --update --no-cache build-base python3-dev python3 libffi-dev libressl-dev bash git gettext curl \
 && curl -O https://bootstrap.pypa.io/get-pip.py \
 && python3 get-pip.py \
 && pip install --upgrade six awscli awsebcli
Collapse
 
ivorsco77 profile image
Ivor Scott

This doesn't work anymore. Also don't use edge, always pin down a stable version.

See more here: gitlab.alpinelinux.org/alpine/apor...

Change to version 3.10.

RUN apk add --no-cache python make g++ \
    && apk add vips-dev fftw-dev build-base \
    --update-cache \
    --repository https://alpine.global.ssl.fastly.net/alpine/v3.10/community \
    --repository https://alpine.global.ssl.fastly.net/alpine/v3.10/main \
    && rm -fR /var/cache/apk/*
Collapse
 
stoutlabs profile image
Daniel Stout • Edited

FYI: At the time of writing, Edge was the only option for this... and I really don't have time to keep this updated. Thanks for the heads up, I'll make another note at the top!

Collapse
 
nrkirby profile image
Nick Kirby

Thanks for this :D

Collapse
 
stoutlabs profile image
Daniel Stout

Awesome! Thanks for your super helpful comment, Jonathan! I'll be sure to make a note in the original post to see your comment.