In build phase, services should be able to reference images built by other services

Our application involves a few generic base images, and then more specific images for each service, which are based on those base images. After my discussions with Okteto personnel, it sounds like the Okteto build service doesn’t support that. There’s no way to guarantee that certain images are built before others, and there’s no way to reference the published image for a different service (like a base image) in an argument to another. I thought the $OKTETO_BUILD_* variables would solve the latter problem, but apparently they are not available during the build phase.

This is a feature request to implement support for this use case. Without it, as far as I can tell, we’ll need to build our images separately, and push them to a separate registry, and then configure the Okteto manifest to pull them from there, which definitely makes the workflow have significantly more friction than it sounded like it was going to have. I’d love to be able to make full use of the Okteto build service and registry. Thanks!

Hi dmccorma! Thanks for the feature request :smiley:

I’m trying to understand a bit more your use case.
Would a shell script be a workaround for this problem? I’m thinking something like

okteto build base-image -t your_registry/base-image
okteto build --build-arg base-image-tag= your_registry/base-image
...

Hi there! They let me know in Slack that this feature request has actually already been addressed, which is very impressive. The PR is at https://github.com/okteto/okteto/pull/3064 . Thanks!

1 Like