Docker Alpine linux package masked

I am trying to install a package on my docker image that runs alpine but I get the following error,

Removing intermediate container 54bbe0932899
Step 14 : RUN apk add openblas openblas-dev --update-cache --repository http://dl-3.alpinelinux.org/alpine/edge/testing/ --allow-untrusted
 ---> Running in 24d7a8c00c89
fetch http://dl-3.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.4/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
ERROR: unsatisfiable constraints:
  openblas-0.2.19-r0:
    masked in: @community
    satisfies: world[openblas]
               openblas-dev-0.2.19-r0[openblas=0.2.19-r0]
  openblas-ilp64-0.2.19-r0:
    masked in: @community
    satisfies:
               openblas-dev-0.2.19-r0[openblas-ilp64=0.2.19-r0]
  openblas-dev-0.2.19-r0:
    masked in: @community
    satisfies: world[openblas-dev]
ERROR: Service 'web' failed to build: The command '/bin/sh -c apk add openblas openblas-dev --update-cache --repository http://dl-3.alpinelinux.org/alpine/edge/testing/ --allow-untrusted' returned a non-zero code: 3

Important part of the Dockerfile:

  • Docker Tutorial: Daemonized Container Closes - Syntax Error
  • Error trying to install Ansible in Jenkins image
  • How can I remove all containers by image name and do nothing if it already removed
  • Set up docker remote execution on windows
  • Cannot authenticate to Docker in Elastic Beanstalk through S3
  • pipelines fail with custom docker image
  • FROM python:3.5.2-alpine
    
    ADD repositories /etc/apk/repositories
    
    RUN apk upgrade --update
    RUN apk add --update libstdc++ curl ca-certificates bash
    RUN apk add openblas openblas-dev --update-cache --repository http://dl-3.alpinelinux.org/alpine/edge/testing/ --allow-untrusted
    RUN apk add --update py-scipy py-numpy py-numpy-dev
    

    The repository file is

    http://dl-cdn.alpinelinux.org/alpine/v3.4/main
    @testing http://dl-cdn.alpinelinux.org/alpine/edge/testing
    @community http://dl-cdn.alpinelinux.org/alpine/edge/community
    

    How I can force the installation of openblas?

    I am new to alpine so apologies if this is a straight forward question.

  • how to run an image of software on other node?
  • Unable to install some PHP extensions (modules) in official Docker PHP Alpine image
  • How to update a Docker Image
  • Docker, Panamax and Laravel
  • docker run complains file not found
  • Using Amazon ECS with google container registry
  • One Solution collect form web for “Docker Alpine linux package masked”

    I found the solution,

    the following line:

    RUN apk add openblas openblas-dev --update-cache --repository http://dl-3.alpinelinux.org/alpine/edge/testing/ --allow-untrusted
    

    should be

    RUN apk add openblas@community openblas-dev@community --update-cache --repository http://dl-3.alpinelinux.org/alpine/edge/community/ --allow-untrusted
    

    Now docker continues to the next stage.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.