Got alpinelinux DNS lookup error while build chirpstack-api

Hello

Trying to build chirpstack API by entering command make swagger. Got error:

docker-compose run --rm chirpstack-api-swagger
Creating network "chirpstack-api_default" with the default driver
Building chirpstack-api-swagger
Step 1/6 : FROM golang:1.16-alpine
1.16-alpine: Pulling from library/golang
Digest: sha256:0d62e9ae180d3a794b162fbc1d13b5084687fdfa0bdfc8b5c424cd5627da8d81
Status: Downloaded newer image for golang:1.16-alpine
 ---> fe5c000a4768
Step 2/6 : ENV PROJECT_PATH=/chirpstack-api
 ---> Running in 6fe110ce06c4
Removing intermediate container 6fe110ce06c4
 ---> 42836300c126
Step 3/6 : RUN apk add --no-cache make git bash protobuf protobuf-dev
 ---> Running in a39542a6de6e
fetch https://dl-cdn.alpinelinux.org/alpine/v3.13/main/x86_64/APKINDEX.tar.gz
WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.13/main: DNS lookup error
fetch https://dl-cdn.alpinelinux.org/alpine/v3.13/community/x86_64/APKINDEX.tar.gz
WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.13/community: DNS lookup error
ERROR: unable to select packages:
  bash (no such package):
    required by: world[bash]
  git (no such package):
    required by: world[git]
  make (no such package):
    required by: world[make]
  protobuf (no such package):
    required by: world[protobuf]
  protobuf-dev (no such package):
    required by: world[protobuf-dev]
Service 'chirpstack-api-swagger' failed to build : The command '/bin/sh -c apk add --no-cache make git bash protobuf protobuf-dev' returned a non-zero code: 5
make: *** [swagger] Error 1

How to solve this problem?

It looks like whatever system you’re building with does not have working internet (or DNS) access. Or routing, etc.