Skip to content
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

support pack bindings #7119

Open
taraszka opened this issue Sep 9, 2024 · 4 comments
Open

support pack bindings #7119

taraszka opened this issue Sep 9, 2024 · 4 comments

Comments

@taraszka
Copy link
Contributor

taraszka commented Sep 9, 2024

Description of feature

Following https://paketo.io/docs/howto/configuration/#bindings, the current dokku implementation lacks pack volume bindings.

@taraszka
Copy link
Contributor Author

taraszka commented Sep 9, 2024

@josegonzalez, I think volume binding during the build phase may require a completely different approach. What do you think? (This https://dokku.com/docs/advanced-usage/persistent-storage/#build-phase will work partially with pack; another thing is that param is required for the pack CLI to make it aware.

I am happy to code this feature myself, but I need some guidance, as storage is managed under storage:<command> <app>, builder has its own namespace builder:set, and the app it owns.

How about builder-pack:binding <app> <host-dir:container-dir> in this case?

@josegonzalez
Copy link
Member

What if we just ignored storage mounts during a pack build unless the container path has the prefix /platform/bindings/ (or whatever the configured SERVICE_BINDING_ROOT env var is), and then pass those along to pack as bindings? That would make it so Dokku doesn't need anything extra and the builder-pack plugin just does the right thing.

@josegonzalez
Copy link
Member

Yeah the more I think about this, the more I think the existing storage plugin should work fine here. It is possible to set storage specifically for the build process and we currently do not filter volumes.

The big issue is that the pack binary doesn't support the -v shorthand flag (which we use in Dokku, ugh sorry) on the build subcommand. This means we'd need to translate them first - probably in the docker-options#docker-args-build trigger. Basically split the values and if we see the flag name is -v, then change it to --volume.

@taraszka
Copy link
Contributor Author

Right, it sounds good to me, too! I'll try to have a look at it during the weekend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants