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

Add option to write Dockerfiles to disk #78

Open
camertron opened this issue Dec 19, 2021 · 2 comments
Open

Add option to write Dockerfiles to disk #78

camertron opened this issue Dec 19, 2021 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@camertron
Copy link
Member

Whether you're using git-ops, want to version your Dockerfiles in source control, or just want to store them in a file, Kuby should support emitting them via the CLI. Perhaps something like kuby dockerfiles -o /path/to/output_dir.

@camertron camertron added enhancement New feature or request good first issue Good for newcomers labels Dec 19, 2021
@kingdonb
Copy link
Contributor

I made up solutions for this issue together with #79 for my own use, not sure I'm ready to upstream anything but I'm thinking about it now. 👍

https://github.com/kingdonb/kuby_test/blob/42e0871fb886a13637232d060fc2efa70938512f/builder.sh#L3-L4

It turned out to be important to separate the dockerfiles for me. So you'll see in the script linked above, I call for the main dockerfile and the assets dockerfile separately. Because of the way this works, there is a new codepath that executes when building the assets-only file, (and it was a while ago already that I did this, but I remember finding out it can fail separately.)

@camertron
Copy link
Member Author

Nice, that's great :) The --only option does make this easier now. Still would be nice to have a CLI option for this, although Kuby would have to impose some sort of file naming convention like you've done with the .assets suffix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants