Images
Common Problems When Using Alpine Images
· β˜• 1 min read
1. DNS Request Timeout Cause: alpine uses the musl library, which has some limitations in DNS resolution [1] Solution: Do not use an apline image, and add the options single-request-reopen setting to the container’s resolv.conf file. This is because the single-request-reopen option only takes effect for the glibc library, while apline images use the musl library.

Troubleshooting Slow IO When Building Images
· β˜• 10 min read
1. The Problem Project details: File size 5.6 GB File count 529352 Dockerfile 1 2 3 FROM golang:1.13 COPY ./ /go/src/code The build command and its output are as follows: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 time DOCKER_BUILDKIT=1 docker build --no-cache -t test:v3 -f Dockerfile .

Run mv Is Slower Than cp in a Dockerfile
· β˜• 6 min read
Unlike on CentOS or Ubuntu, where we feel that mv is faster than cp, when you build an image with a Dockerfile, using Run cp is faster than Run mv. This post presents the test and verification data behind that. 1. Test Setup Machine environment Ubuntu 20.04.1 LTS 32C

Error Pulling a Large Image
· β˜• 4 min read
1. Picking Up from Last Time: Shared Storage Optimizes Pulling Images Overseas Building on An Image Management and Distribution Case Based on Harbor and Registry, I recently made another optimization. The previous approach was to deploy a Mirror Cache in each region on a machine with low specs and a large disk to cache images.

How to Hijack docker.io Image Traffic to a Private Repository
· β˜• 4 min read
1. Self-signing a *.docker.io Domain Certificate 1.1 Creating a CA Certificate Generate the CA certificate private key 1 openssl genrsa -out ca.key 4096 Generate the CA certificate 1 2 3 4 openssl req -x509 -new -nodes -sha512 -days 3650 \ -subj "/C=CN/ST=Beijing/L=Beijing/O=example/OU=Personal/CN=chenshaowen.com" \ -key ca.key \ -out ca.crt 1.2 Creating a *.