scripter
scripter

Reputation: 1531

docker build ERROR: https://dl-cdn.alpinelinux.org/alpine/v3.14/community: temporary error (try again later)

hello guys i have wierd problem when i try to build docker image in ubuntu 22 vm

[+] Building 10.6s (5/14)                                                                                                                        
 => [internal] load build definition from Dockerfile                                                                                        0.0s
 => => transferring dockerfile: 864B                                                                                                        0.0s
 => [internal] load .dockerignore                                                                                                           0.0s
 => => transferring context: 2B                                                                                                             0.0s
 => [internal] load metadata for docker.io/kong/kong:2.7.0                                                                                  0.0s
 => CACHED [ 1/12] FROM docker.io/kong/kong:2.7.0                                                                                           0.0s
 => ERROR [ 2/12] RUN apk update && apk add git unzip luarocks                                                                             10.5s
------                                                                                                                                           
 > [ 2/12] RUN apk update && apk add git unzip luarocks:                                                                                         
#0 0.240 fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/main/x86_64/APKINDEX.tar.gz                                                           
#0 5.245 ERROR: https://dl-cdn.alpinelinux.org/alpine/v3.14/main: temporary error (try again later)                                              
#0 5.283 fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/community/x86_64/APKINDEX.tar.gz                                                      
#0 10.29 ERROR: https://dl-cdn.alpinelinux.org/alpine/v3.14/community: temporary error (try again later)                                         
#0 10.48 v3.14.3-58-g7fc21b9dfb [https://dl-cdn.alpinelinux.org/alpine/v3.14/main]
#0 10.48 v3.14.3-57-g005638434d [https://dl-cdn.alpinelinux.org/alpine/v3.14/community]
#0 10.48 2 errors; 14942 distinct packages available
------
failed to solve: executor failed running [/bin/sh -c apk update && apk add git unzip luarocks]: exit code: 2

docker version Docker version 20.10.18, build b40c2f6

tried restarting docker engine but with no luck

Upvotes: 5

Views: 4969

Answers (1)

scripter
scripter

Reputation: 1531

added network=host fixed my problem

 build:
      context: ../kong2
      network: host

Upvotes: 10

Related Questions