kokoichi206 / cloud-prac

0 stars 0 forks source link

base: alpine の apk update で『process "/bin/sh -c apk update" did not complete successfully: exit code: 4』 #25

Open kokoichi206 opened 9 months ago

kokoichi206 commented 9 months ago

Host env

$ uname -a
Linux ubuntu 5.4.0-1045-raspi #49-Ubuntu SMP PREEMPT Wed Sep 29 17:49:16 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux

$ docker version
Client: Docker Engine - Community
 Version:           20.10.23
 API version:       1.41
 Go version:        go1.18.10
 Git commit:        7155243
 Built:             Thu Jan 19 17:32:52 2023
 OS/Arch:           linux/arm64
 Context:           default
 Experimental:      true

Server:
 Engine:
  Version:          24.0.5
  API version:      1.43 (minimum version 1.12)
  Go version:       go1.20.8
  Git commit:       a61e2b4
  Built:            Sat Oct  7 00:29:03 2023
  OS/Arch:          linux/arm64
  Experimental:     false
 containerd:
  Version:          v1.6.21
  GitCommit:        3dce8eb055cbb6872793272b4f20ed16117344f8
 runc:
  Version:          1.1.7
  GitCommit:        
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

Dockerfile

FROM alpine:latest

RUN apk update
RUN apk add --no-cache curl

COPY localhost_version /etc/localhost_version

build command

ubuntu@ubuntu:~/work/linux/container/from_basic$ docker build -t myimage:test .
[+] Building 13.7s (6/8)                                                                                                     
 => [internal] load .dockerignore                                                                                       0.1s
 => => transferring context: 2B                                                                                         0.1s
 => [internal] load build definition from Dockerfile                                                                    0.3s
 => => transferring dockerfile: 153B                                                                                    0.1s
 => [internal] load metadata for docker.io/library/alpine:latest                                                        0.0s
 => CACHED [1/4] FROM docker.io/library/alpine:latest                                                                   0.0s
 => [internal] load build context                                                                                       0.0s
 => => transferring context: 39B                                                                                        0.0s
 => ERROR [2/4] RUN apk update                                                                                         11.6s
------                                                                                                                       
 > [2/4] RUN apk update:                                                                                                     
#6 0.659 fetch https://dl-cdn.alpinelinux.org/alpine/v3.18/main/aarch64/APKINDEX.tar.gz                                      
#6 5.665 WARNING: updating and opening https://dl-cdn.alpinelinux.org/alpine/v3.18/main: temporary error (try again later)   
#6 5.665 fetch https://dl-cdn.alpinelinux.org/alpine/v3.18/community/aarch64/APKINDEX.tar.gz                                 
#6 10.67 WARNING: updating and opening https://dl-cdn.alpinelinux.org/alpine/v3.18/community: temporary error (try again later)
#6 10.67 4 unavailable, 0 stale; 15 distinct packages available
------
process "/bin/sh -c apk update" did not complete successfully: exit code: 4
kokoichi206 commented 9 months ago
$ resolvectl status eth0
Link 2 (eth0)
      Current Scopes: DNS       
DefaultRoute setting: yes       
       LLMNR setting: yes       
MulticastDNS setting: no        
  DNSOverTLS setting: no        
      DNSSEC setting: no        
    DNSSEC supported: no        
  Current DNS Server: 8.8.8.8   
         DNS Servers: 127.0.0.53
                      8.8.8.8   
                      8.8.4.4