Skip to content

Instantly share code, notes, and snippets.

@kunalkushwaha
Created June 28, 2018 01:15
Show Gist options
  • Select an option

  • Save kunalkushwaha/b4b940e879772db6a79c91691f46cc7e to your computer and use it in GitHub Desktop.

Select an option

Save kunalkushwaha/b4b940e879772db6a79c91691f46cc7e to your computer and use it in GitHub Desktop.
No CNI config and CNI bridge on system
$ ifconfig                
docker0   Link encap:Ethernet  HWaddr 02:42:de:92:29:22  
          inet addr:172.17.0.1  Bcast:172.17.255.255  Mask:255.255.0.0
          inet6 addr: fe80::42:deff:fe92:2922/64 Scope:Link
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:19 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:2023 (2.0 KB)

enp1s0    Link encap:Ethernet  HWaddr 18:a9:05:c1:ed:99  
          inet addr:172.20.20.50  Bcast:172.20.63.255  Mask:255.255.192.0
          inet6 addr: fe80::1aa9:5ff:fec1:ed99/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:365743 errors:0 dropped:122485 overruns:0 frame:0
          TX packets:107148 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:272233343 (272.2 MB)  TX bytes:7680248 (7.6 MB)
          Interrupt:17 
Buildkit daemon log
$ sudo  bin/buildkitd --debug --root /var/lib/buildkit 
DEBU[0000] auto snapshotter: using overlayfs            
INFO[0000] found worker "xc4m3r6kcagve0zbdktzdmurd", labels=map[org.mobyproject.buildkit.worker.os:linux org.mobyproject.buildkit.worker.arch:amd64 org.mobyproject.buildkit.worker.executor:oc
i org.mobyproject.buildkit.worker.snapshotter:overlayfs org.mobyproject.buildkit.worker.hostname:kunal-HP-linux] 
WARN[0000] skipping containerd worker, as "/run/containerd/containerd.sock" does not exist 
INFO[0000] found 1 workers, default="xc4m3r6kcagve0zbdktzdmurd" 
WARN[0000] currently, only the default worker can be used. 
INFO[0000] running server on /run/buildkit/buildkitd.sock 
DEBU[0003] session started                              
WARN[0003] oci exporter: unknown option output          
DEBU[0004] new ref for local: ocdcj0ssfhdj64hf1hsp8asus 
DEBU[0004] diffcopy took: 1.386784ms                    
DEBU[0004] saved ocdcj0ssfhdj64hf1hsp8asus as local.sharedKey:context:.dockerignore: 
DEBU[0004] new ref for local: 256j3w8obasmgk6vfvsslf3gu 
DEBU[0004] diffcopy took: 2.562095ms                    
DEBU[0004] saved 256j3w8obasmgk6vfvsslf3gu as local.sharedKey:dockerfile:Dockerfile: 
DEBU[0005] resolving                                    
DEBU[0005] do request                                    request.headers=map[Accept:[application/vnd.docker.distribution.manifest.v2+json, application/vnd.docker.distribution.manifest.list.v2
+json, application/vnd.oci.image.manifest.v1+json, application/vnd.oci.image.index.v1+json, *]] request.method=HEAD url="https://registry-1.docker.io/v2/library/golang/manifests/alpine"
DEBU[0005] fetch response received                       response.headers=map[Content-Type:[application/json; charset=utf-8] Docker-Distribution-Api-Version:[registry/2.0] Www-Authenticate:[B
earer realm="https://auth.docker.io/token",service="registry.docker.io",scope="repository:library/golang:pull"] Date:[Thu, 28 Jun 2018 01:01:17 GMT] Content-Length:[157] Strict-Transport-Secu
rity:[max-age=31536000]] status="401 Unauthorized" url="https://registry-1.docker.io/v2/library/golang/manifests/alpine"
DEBU[0005] Unauthorized                                  header="Bearer realm="https://auth.docker.io/token",service="registry.docker.io",scope="repository:library/golang:pull""
DEBU[0006] do request                                    request.headers=map[Accept:[application/vnd.docker.distribution.manifest.v2+json, application/vnd.docker.distribution.manifest.list.v2
+json, application/vnd.oci.image.manifest.v1+json, application/vnd.oci.image.index.v1+json, *]] request.method=HEAD url="https://registry-1.docker.io/v2/library/golang/manifests/alpine"
DEBU[0007] fetch response received                       response.headers=map[Strict-Transport-Security:[max-age=31536000] Content-Length:[2035] Content-Type:[application/vnd.docker.distribut
ion.manifest.list.v2+json] Docker-Content-Digest:[sha256:0cd3f4746c8c592c3f0635b0122ea3cc0d54f0aa64e35853c8344fcbb2a59de7] Docker-Distribution-Api-Version:[registry/2.0] Etag:["sha256:0cd3f47
46c8c592c3f0635b0122ea3cc0d54f0aa64e35853c8344fcbb2a59de7"] Date:[Thu, 28 Jun 2018 01:01:18 GMT]] status="200 OK" url="https://registry-1.docker.io/v2/library/golang/manifests/alpine"
DEBU[0007] resolved                                      desc.digest=sha256:0cd3f4746c8c592c3f0635b0122ea3cc0d54f0aa64e35853c8344fcbb2a59de7
DEBU[0007] fetch                                         digest=sha256:0cd3f4746c8c592c3f0635b0122ea3cc0d54f0aa64e35853c8344fcbb2a59de7 mediatype="application/vnd.docker.distribution.manifest
.list.v2+json" size=2035
.
.
. <snip>
.
.
INFO[0041] No non-localhost DNS nameservers are left in resolv.conf. Using default external servers: [nameserver 8.8.8.8 nameserver 8.8.4.4] 
INFO[0041] IPv6 enabled; Adding default IPv6 external servers: [nameserver 2001:4860:4860::8888 nameserver 2001:4860:4860::8844] 
ERRO[0041] CNI network error : cni config load failed: no network config found in /etc/cni/net.d: cni plugin not initialized: failed to load cni config 
INFO[0041] enabling HostNetworking                      
DEBU[0041] > creating 0aju552oriyr43uidngjazg1d [/bin/sh -c ip a] 
ERRO[0042] CNI network error : cni config load failed: no network config found in /etc/cni/net.d: cni plugin not initialized: failed to load cni config 
INFO[0042] enabling HostNetworking                      
DEBU[0042] > creating bivpsm2090a6vblh21d2c2tsx [/bin/sh -c apk update | tee /b] 
ERRO[0043] CNI network error : cni config load failed: no network config found in /etc/cni/net.d: cni plugin not initialized: failed to load cni config 
INFO[0043] enabling HostNetworking                      
DEBU[0043] > creating zwl20vq2km7swrpyqx3ainjyr [/bin/sh -c echo "146" > test.txt] 
ERRO[0043] CNI network error : cni config load failed: no network config found in /etc/cni/net.d: cni plugin not initialized: failed to load cni config 
INFO[0043] enabling HostNetworking                      
DEBU[0043] > creating 8m98e5u73cwbcvemm7bdiugcf [/bin/sh -c echo "123" > test.txt] 
ERRO[0044] CNI network error : cni config load failed: no network config found in /etc/cni/net.d: cni plugin not initialized: failed to load cni config 
INFO[0044] enabling HostNetworking                      
DEBU[0044] > creating 0j1q8b8rn1owmc5kmy3g9yua5 [/bin/sh -c echo "146" > test.txt] 
ERRO[0045] CNI network error : cni config load failed: no network config found in /etc/cni/net.d: cni plugin not initialized: failed to load cni config 
INFO[0045] enabling HostNetworking                      
DEBU[0045] > creating vc3r0ouizrvrsjfp0vfe18fpe [/bin/sh -c apk add vim] 
ERRO[0047] CNI network error : cni config load failed: no network config found in /etc/cni/net.d: cni plugin not initialized: failed to load cni config 
INFO[0047] enabling HostNetworking                      
DEBU[0047] > creating uisv3vzt3e6uiosuouf329jgp [/bin/sh -c apk add curl] 
DEBU[0049] Using double walk diff for /run/user/1000/containerd-mount519362666 from /run/user/1000/containerd-mount980281976 
DEBU[0049] Using double walk diff for /run/user/1000/containerd-mount089746075 from /run/user/1000/containerd-mount512222913 
DEBU[0049] Using double walk diff for /run/user/1000/containerd-mount523281184 from /run/user/1000/containerd-mount176372030 
DEBU[0049] Using double walk diff for /run/user/1000/containerd-mount134241929 from /run/user/1000/containerd-mount554040319 
DEBU[0049] Using double walk diff for /run/user/1000/containerd-mount891756198 from /run/user/1000/containerd-mount926731860 
DEBU[0049] Using double walk diff for /run/user/1000/containerd-mount893281992 from /run/user/1000/containerd-mount046448589 
DEBU[0049] Using double walk diff for /run/user/1000/containerd-mount177196881 from /run/user/1000/containerd-mount311892282 
DEBU[0056] session finished: <nil>                      
DEBU[0057] remove snapshot                               key=27v5a0tucnuqapsr3mo9p9hbo snapshotter=overlayfs
DEBU[0057] remove snapshot                               key=lg5eyfp4jtkj1oszb9nrvrx14 snapshotter=overlayfs
DEBU[0057] remove snapshot                               key=yrf285da7w6h4zjckcuvk8a4d snapshotter=overlayfs
DEBU[0057] remove content                                key="sha256:70848703d402cf7229735bf5e4acf5f11252ff9447269bea3f082b34e60dc5ff"
DEBU[0057] remove content                                key="sha256:9e1353be08648cda69c805d608324332a43f2501d487632a98789e3a1e74cfbf"
DEBU[0057] schedule snapshotter cleanup                  snapshotter=overlayfs
DEBU[0057] schedule content cleanup                     
DEBU[0057] removed content                               digest=sha256:70848703d402cf7229735bf5e4acf5f11252ff9447269bea3f082b34e60dc5ff
DEBU[0057] removed content                               digest=sha256:9e1353be08648cda69c805d608324332a43f2501d487632a98789e3a1e74cfbf
DEBU[0057] content garbage collected                     d=664.283µs
DEBU[0057] removed snapshot                              key="buildkit/4/lg5eyfp4jtkj1oszb9nrvrx14" snapshotter=overlayfs
DEBU[0058] removed snapshot                              key="buildkit/6/yrf285da7w6h4zjckcuvk8a4d" snapshotter=overlayfs
DEBU[0058] removed snapshot                              key="buildkit/32/27v5a0tucnuqapsr3mo9p9hbo" snapshotter=overlayfs
DEBU[0058] snapshot garbage collected                    d=280.235879ms snapshotter=overlayfs

Dockerfile
$ cat Dockerfile       
FROM golang:alpine
ENV http_proxy="http://test:1234"
ENV https_proxy="http://test:1234"
RUN ip a 
RUN apk update | tee /b
RUN echo "146" > test.txt
RUN echo "123" > test.txt
RUN echo "146" > test.txt
RUN apk add vim  
RUN apk add curl 

Client Side logs
$ sudo build-using-dockerfile -t foo .
[+] Building 53.1s (11/11) FINISHED                                                            
 => local://context (.dockerignore)                                                       0.7s
 => => transferring context: 02B                                                          0.0s
 => local://dockerfile (Dockerfile)                                                       1.0s
 => => transferring dockerfile: 296B                                                      0.0s
 => docker-image://docker.io/library/golang:alpine@sha256:0cd3f4746c8c592c3f0635b0122ea  32.4s
 => => resolve docker.io/library/golang:alpine@sha256:0cd3f4746c8c592c3f0635b0122ea3cc0d  0.0s
 => => sha256:0cd3f4746c8c592c3f0635b0122ea3cc0d54f0aa64e35853c8344fcbb2 2.04kB / 2.04kB  0.0s
 => => sha256:79d51d23fc6e05e4e1c828c972452b603407a8dc80cabdeccc9f6476f7 1.36kB / 1.36kB  0.0s
 => => sha256:08379be5666937f85867b339cfe525041393c2ed898f1e4893f385d55dc01c 126B / 126B  1.4s
 => => sha256:22e024490b477bf7054977d511bd522ee33594e745abdd849b85f91963 3.87kB / 3.87kB  0.0s
 => => sha256:ae8dbf6f23bf1c326de78fc780c6a870bf11eb86b45a7dc5671260 308.02kB / 308.02kB  2.1s
 => => sha256:0d01df27c53e651ecfa5c689dafb8c63c759761a757cc37e30eccc5e3a3cae 153B / 153B  1.9s
 => => sha256:ff3a5c916c92643ff77519ffa742d3ec61b7f591b6b7504599d95a4a41 2.07MB / 2.07MB  3.5s
 => => sha256:6df7ec5fa8eab0fb4b8ec46310c6e4b1ef221e0aefe0c7d642bc0 113.26MB / 113.26MB  16.2s
 => => sha256:08379be5666937f85867b339cfe525041393c2ed898f1e4893f385d55dc01c 126B / 126B  1.4s
 => => sha256:0d01df27c53e651ecfa5c689dafb8c63c759761a757cc37e30eccc5e3a3cae 153B / 153B  1.9s
 => => sha256:ff3a5c916c92643ff77519ffa742d3ec61b7f591b6b7504599d95a4a41 2.07MB / 2.07MB  3.5s
 => => unpacking docker.io/library/golang:alpine@sha256:0cd3f4746c8c592c3f0635b0122ea3c  15.6s
 => /bin/sh -c ip a                                                                       0.4s
 => /bin/sh -c apk update | tee /b                                                        0.8s
 => /bin/sh -c echo "146" > test.txt                                                      0.5s
 => /bin/sh -c echo "123" > test.txt                                                      0.6s
 => /bin/sh -c echo "146" > test.txt                                                      0.6s
 => /bin/sh -c apk add vim                                                                2.0s
 => /bin/sh -c apk add curl                                                               0.9s
 => exporting to oci image format                                                         8.7s
 => => exporting layers                                                                   5.8s
 => => exporting manifest sha256:9e1353be08648cda69c805d608324332a43f2501d487632a98789e3  0.1s
 => => exporting config sha256:70848703d402cf7229735bf5e4acf5f11252ff9447269bea3f082b34e  0.1s
 => => sending tarball                                                                    2.1s
INFO[0053] Loading the image to Docker as "foo". This may take a while. 
feb91a98e70c: Loading layer     130B/130B
9551ba4ec45d: Loading layer  1.221MB/1.221MB
919081ae37e5: Loading layer     144B/144B
27d35522c4ef: Loading layer     147B/147B
2bd9616b81cb: Loading layer     147B/147B
f7cb33431cd2: Loading layer  8.926MB/8.926MB
73d787c509f0: Loading layer  510.1kB/510.1kB
The image foo:latest already exists, renaming the old one with ID sha256:470aae3140fb6ac1c08242a9461bfe657ec9d645d0dabcfb24cff1203efa39c7 to empty string
Loaded image: foo:latest
INFO[0056] Done                                       
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment