pack: Default builder/stack doesn't work for Kind
I’m trying to run a container build with pack locally with Kind. I get errors when building with the default builder/stack (cloudfoundry/cnb:bionic), however the container imports and starts correctly when using cloudfoundry/cnb:cflinuxfs3. (pack version == v0.3.0 (git sha: 3123e32ea7c570527c6e2cdb31f4e5c002334287))
Steps to reproduce:
- Install Kind
- Create cluster
kind create cluster --name spring-music-test - Target cluster
export KUBECONFIG="$(kind get kubeconfig-path --name="spring-music-test")" - Clone the spring-music package
git clone https://github.com/cloudfoundry-samples/spring-music - Build with pack
cd spring-music && pack build - Load image into Kind:
kind load --loglevel trace docker-image --name=spring-music-test spring-music:dev
You will get the error:
DEBU[09:55:15] Running: /usr/local/bin/docker [docker exec --privileged -i spring-music-test-control-plane ctr --namespace=k8s.io images import -] Error: failed to load image: exit status 1
Running it again gets a 0 exit code but the container fails to run with:
message: ‘failed to create containerd container: error unpacking image: failed │c2518 16 hours ago 268MB to resolve rootfs: content digest sha256:7b31218c2518ad8a39b3505a5ad5345e5f5da2086ffbfa2cec2f4b05d8118e8d: │spring-music latest 7b31218 not found’ │c2518 16 hours ago 268MB reason: CreateContainerError
If you run through the same steps but instead run pack build --builder=cloudfoundry/cnb:cflinuxfs3 spring-music the container will deploy and start correctly.
Hope that’s useful, It’s hard to see what’s going on in any more detail but I’m guessing it’s something on pack’s side given it does work with a different stack.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 16 (13 by maintainers)
I think the image creation logic was fixed in
packv0.8.1, but the heroku builder probably hadn’t been recreated using the fixed version ofpackyet.I’ve run tests on a clean environment and I still see the issue. pack v0.8.1 kind v0.7.0 node v1.17.0 @sha256:9512edae126da271b66b990b6fff768fbb7cd786c7d39e86bdf55906352fdf62 Docker Desktop MacOS 2.1.7.0
Could the issue be re-opened?
Last time I tried with v0.6.0, it also failed. I’ll try again