The Linux Page

ERROR: unsatisfiable constraints: bzr (missing): required by: world[bzr]

Gopher admiring a flower

The Alpine docker, which is used for golang, removed bzr so you have to remove it from your RUN apk command line.

Here is a copy of the error I was getting:

Building my-docker
Step 1/13 : FROM golang:alpine AS build-env
 ---> 3289bf11c284
Step 2/13 : RUN apk --no-cache add build-base git bzr mercurial gcc curl
 ---> Running in 7a02405b2439
fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/community/x86_64/APKINDEX.tar...
ERROR: unsatisfiable constraints:
  bzr (missing):
    required by: world[bzr]
ERROR: Service 'my-docker' failed to build: The command '/bin/sh -c apk --no-cache add build-base git bzr mercurial gcc curl' returned a non-zero code: 1

As we can see, the output includes the RUN command as I still had the bzr reference.

I removed that and the docker built as expected.