Skip to content

Add support for custom Dockerfile template#5

Draft
bchassoul wants to merge 1 commit intomainfrom
bchassoul/templates
Draft

Add support for custom Dockerfile template#5
bchassoul wants to merge 1 commit intomainfrom
bchassoul/templates

Conversation

@bchassoul
Copy link

No description provided.

@bchassoul bchassoul marked this pull request as draft March 29, 2025 19:40
Copy link
Contributor

@sylane sylane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is definitely a great addition, but looking at where you needed that for, wouldn't that be better to add configuration to better customise the default template ? Otherwise, instead of making the plugin more powerful and customisable, all the project will progressively use their own templates, then why wouldn't they use Dockerfile directly instead ?

Looking quickly at the custom templates you used It for, it seems the only extra config needed to be able to use the default template would be:

  • Add way to extend the files copied into the builder (line 24) and maybe change the default template as it would make sense for it to include c_src, src, priv, config and optional _checkouts anyway.
  • Add config to change the entry point, with the possibility to specify a custom script...

This PR is still very useful, but I am a bit worried that if a custom template is the easy way out of a missing feature, the plugin is kind of loosing its meaning.

runtime_packages => [#{name => N}
|| N <- maps:get(runtime_packages, Config)]
}.
template_file(RState, Config) ->
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

space ?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants