rancher / dapper

Docker build wrapper
Apache License 2.0
365 stars 89 forks source link

how about build container image without docker #101

Open xiaods opened 2 years ago

xiaods commented 2 years ago

because rancher desktop provide all-in-one k8s single node environment, so I wanto build cicd pipeline based on k8s. it need dapper to build image to me.

xiaods commented 2 years ago

how about replace hardcode docker string to nerdctl. https://github.com/rancher/dapper/blob/232d4a5119dd3d526e83cdea35840bcdf3d808d0/file/file.go#L58

xiaods commented 2 years ago
/usr/local/bin via 🐍 v3.9.1 on ☁️  xiaods@gmail.com took 50s 
❯ ll -ls nerdctl
0 lrwxr-xr-x 1 xiaods admin 81 10 13 23:21 nerdctl -> '/Applications/Rancher Desktop.app/Contents/Resources/resources/darwin/bin/nerdctl'

/usr/local/bin via 🐍 v3.9.1 on ☁️  xiaods@gmail.com took 3s 
❯ nerdctl version
Client:
 Version:       v0.12.1
 Git commit:    6f0c8b7bc63270404c9f5810a899e6bae7546608

Server:
 containerd:
  Version:      v1.4.11-k3s1
  GitCommit:
❯ nerdctl build -t k8e ./Dockerfile.dapper 
ERRO[0000] error: failed to list workers: Unavailable: connection error: desc = "transport: error while dialing: dial unix /run/buildkit/buildkitd.sock: connect: no such file or directory" 
FATA[0000] `buildctl` needs to be installed and `buildkitd` needs to be running, see https://github.com/moby/buildkit: exit status 1