-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request - Support for podman builder #8430
Comments
@vikas027 Thank you for filing the request, agreed this is a nice to have. Mark this as p3 at the moment, we can bump this later if we see more people ask this feature. |
I have a working Podman setup on macOS, and pulling/pushing images works fine with the
Even with |
I too would like to see this feature! @AndiDog can you share your steps on how you got yours working? |
I meant above that Podman doesn't work well for me with Skaffold. By now, I've dropped Podman on macOS in favor of colima due to all the problems and because it's hard to contribute to the open source podman project using a Mac... If you meant how to set up Podman, then Podman Desktop works out of the box. |
I was referring to this section
How have you created a dummy binary? I though symlink but docker uses a daemon (annoyingly) so that wouldnt work I've just moved from docker to podman, and everything other than skaffold works! |
I second the request for Podman support. Running everything from windows with a podman machine and k3s/containerd on another wsl instance is a really good workflow, and I only miss Skaffold to make it a complete solution. |
That's something that would be really important to have! |
So I'm not sure if this is a mixture of me missing something, or something starting to work, but I will post it here. I seem to have gotten skaffold and podman to work together? When you start a podman machine, it gives you a command saying (paraphrased) I tried it, and it seems to now work export DOCKER_HOST='unix:///Users/<username>/.local/share/containers/podman/machine/qemu/podman.sock' Note, this is on a mac Skaffold file apiVersion: skaffold/v4beta5
kind: Config
metadata:
name: gcs-web-server
build:
artifacts:
- image: ghcr.io/userbradley/gcs-web-server
context: .
docker:
dockerfile: Dockerfile
I am more than happy to be proved wrong on this one, as this does feel a little too good to be true |
That workaround stopped working a year ago. One of skaffold's releases made it so docker doesn't use the docker remote api and always uses the docker cli #7883 (comment) |
hi @foxydevloper the workaround is supposed to work, #8430 (comment) talked about the same approach 3 month ago, |
Just to clarify, even the workaround works, we're still working on this feature. |
@ericzzzzzzz The workaround doesn't appear to work for me on windows, it says the docker executable is required. |
Hi @foxydevloper , Skaffold does use golang docker rest client to talk to docker host by default, unless user explicitly sets Docker useCli to true or skaffold detects that user needs cross-platform build to make the run successful. |
@ericzzzzzzz The configuration is as follows: apiVersion: skaffold/v4beta6
kind: Config
metadata:
name: dummyproj
build:
local:
useDockerCLI: false # default value so shouldn't matter
artifacts:
- image: hello
docker:
dockerfile: Dockerfile
manifests:
rawYaml:
- hello.yaml As you can see, I explicitly have |
I sent this issue earlier: #7883, which appears to be the same issue, where it's using the docker CLI instead of docker's api. It recommends downgrading to a very old version of skaffold. |
ahhh.. skaffold/cmd/skaffold/app/cmd/flags.go Lines 719 to 729 in 5943bd5
dev , run , debug "check-cluster-node-platforms" is set to true , that will lead skaffold to use cli for build..
Could you try to set this flag to false to see if it works? |
@ericzzzzzzz Yes, that does indeed fix it and it works perfectly. |
@ericzzzzzzz Is this something that will always require this flag to work properly? it's nice there's a workaround but the expectation is that skaffold would work with anything that supports docker's api out of the box without a flag. Skaffold should at least be more clear as to why it's looking for the docker executable and recommend using the flag to opt out. I'd love for this to be improved somewhat |
@foxydevloper agreed! I think the reason skaffold is doing that is mainly for corss-platform builds, by default skaffold tries to figure out what platform a image should be build for, that's why it uses target k8s cluster arch as platform, and when platform is specified, the implementation will use docker cli, probably building cross-platform image through docker rest client was not an option during that time. It should be something doable now, thank you for bring this up. |
Ran into this as well on Windows, had to install the docker cli, then do |
Fedora 38, podman 4.7.2, skaffold 2.9.0 Anyone know workaround for this? |
Hi @AlexGluck , could you provide minimal reproducible project for us to get a better understanding of the problem you encountered, also you may use this https://github.com/GoogleContainerTools/skaffold/tree/639694dcfead2a825450cc9f3b4696f39d8cf961/examples/helm-deployment helm example project to verifiy if podman works on your end. |
@ericzzzzzzz Example of my skaffold file: ---
apiVersion: skaffold/v3
kind: Config
metadata:
name: local
build:
tagPolicy:
sha256: {}
local:
useBuildkit: true
artifacts:
- image: skaffold-helm
docker:
dockerfile: ./Dockerfile
deploy:
helm:
releases:
- name: skaffold-helm
chartPath: charts
namespace: rooster
createNamespace: true
setValueTemplates:
image: "{{.IMAGE_REPO_skaffold_helm}}:{{.IMAGE_TAG_skaffold_helm}}@{{.IMAGE_DIGEST_skaffold_helm}}"
... |
Hi, @AlexGluck I cannot reproduce this on my Mac machine and I commented out useBuildkit as I don't have docker-cli installed, using that will direct it to use docker-cli but I don't think that is the issue. Everything works fine when I use this config with skaffold example project, is it possible for you to share a complete reproducible project or could you use |
Full log here 1048 git clone https://github.com/GoogleContainerTools/skaffold.git
1049 cd skaffold/
1050 git checkout 639694dcfead2a825450cc9f3b4696f39d8cf961
1051 cd examples/helm-deployment
1052 cat <<EOF > skaffold.yaml
---
apiVersion: skaffold/v3
kind: Config
metadata:
name: local
build:
tagPolicy:
sha256: {}
local:
useBuildkit: true
artifacts:
- image: skaffold-helm
docker:
dockerfile: ./Dockerfile
deploy:
helm:
releases:
- name: skaffold-helm
chartPath: charts
namespace: rooster
createNamespace: true
setValueTemplates:
image: "{{.IMAGE_REPO_skaffold_helm}}:{{.IMAGE_TAG_skaffold_helm}}@{{.IMAGE_DIGEST_skaffold_helm}}"
...
EOF
1053 skaffold dev -v DEBUG |
I would like this feature to be made available as soon as possible. |
Maybe you'll find this useful. Podman is used for building (with cache enabled) and pushing image to local registry. This speeds up the development cycle because 'kind load' is slow. |
It would be great to have
podman
in the builders list.I have also tried using
podman-docker
to fake docker commands to use podman in vain (as expected).The text was updated successfully, but these errors were encountered: