https://pulumi.com logo
#python
Title
# python
i

important-energy-56546

01/09/2024, 12:25 AM
I tried search but I may not be using the right terms. I have docker desktop installed, with pre-built images. Is it possible to push docker images to kubernetes, using docker desktop's cache? the docker.Image object wants a Dockerfile to build from but I'm trying to avoid making things complicated by keeping Dockerfiles in sync.
g

great-sunset-355

01/09/2024, 7:28 AM
While this is not pulumi related, you do not push docker images to kubernetes. Kubernetes
pull
the image from the registry. What you should search is
docker desktop kubernetes pull from local registry
, then read this article should give you enough info https://www.docker.com/blog/how-kubernetes-works-under-the-hood-with-docker-desktop/
b

bumpy-glass-30283

01/09/2024, 2:12 PM
for me understanding the following concepts helped a lot: • image: i.e. the filesystem • container: a running instance of an image • pod: one or more containers bundled together (usually one, but sometimes there are small ones bundled next to it for logging, git sync, etc.)
i

important-energy-56546

01/09/2024, 2:14 PM
The point still stands. Can I have pulumi recognise that I have the images and don't wish to push them to the registry?
I'm using pulumi locally for learning, and keeping the Dockerfiles in sync between my pet project and where I'm working on Pulumi is an extra task
b

bumpy-glass-30283

01/09/2024, 2:19 PM
Not sure I understand the setup. So you're trying to deploy containers to k8s with pulumi, and you want to use docker desktop's cache repo as a source of the images?
i

important-energy-56546

01/09/2024, 2:19 PM
Yep
The python documentation doesn't say if it can or can't handle that.
b

bumpy-glass-30283

01/09/2024, 2:22 PM
Well based on this you will need to set up a local registry: https://forums.docker.com/t/docker-desktop-local-registry-url/122956 not sure how you can expose the images inside docker desktop
i

important-energy-56546

01/09/2024, 2:25 PM
Gotcha, thanks.