Hey pants people! Quick question: Is there a way t...
# general
f
Hey pants people! Quick question: Is there a way to make a Docker image inherit from a base image also built by pants? Is this possible if we add a registry name to the image when building?
1
Ah nevermind, I think I found what I was looking for at the end of this post: https://blog.pantsbuild.org/optimizing-python-docker-deploys-using-pants/ Always helps to ask!
r
Someone correct me if I'm wrong but I believe the Multiple Images and tagging only works if you're publishing both your base image and your concrete image through pants. In my case, we couldn't use
pants publish
for our Docker images because our cloud ops team keeps tight control over what gets published to our internal image repo, so I had to rig up some custom plugin code to make it all work.
c
that blog post doesn’t mention the possibility to use
Copy code
ARG BASEIMAGE=some/other/image:target
FROM $BASEIMAGE
...
that works without publishing anything..