-
Notifications
You must be signed in to change notification settings - Fork 238
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
Able to set Docker network and custom hosts during build #1057
Comments
Would defs take a PR for this! |
I'll tinker around a little bit, see if I can open up a PR. No Rust experience yet though, going to be a bumpy ride but I'm in for it 😄 |
Out of curiosity @JakeCooper; would you like to see this as a configuration option in the toml (the nixpack plan) or a command line argument? |
Ideally both but start with the command line arg? |
Uh... there are some issues with this unfortunately. It seems that it is not possible with the moby/buildkit#978 This looks worrying for this feature to be honest. Any ideas here? Perhaps this could be possible;
What are your thoughts? |
After tinkering a lot with it, I believe I can make this work. Here's my proposal; When the
This allows the Dockerfile to fetch endpoints in the network This would involve some small changes to the working of nixpack, being;
This can add some complexity to Nixpacks that I can understand, you folks perhaps don't want in Nixpacks. Admitted; Rust is not my primary language at all, but I feel confident that I am able to draft up a PR that;
How do you feel about this, @JakeCooper? |
I've created #1119 to allow |
Feature request
Simply able to set custom docker network (--network) and add hosts (--add-host) to the nixpacks command, so the build process will have access to the internal resources - and in case of a user defined network - and dns.
Motivation
For example, if you build a NodeJS based project with Prisma(prisma.io), the build process is not able to access the database to generate types for the final image.
Contribution
I can help with more details, or even submit a PR.
The text was updated successfully, but these errors were encountered: