-
Notifications
You must be signed in to change notification settings - Fork 576
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 initial dockerfile generator #1602
Conversation
e90330e
to
773405c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general this looks great to me, and I've tested the branch locally to check that it works. Just some minor suggestions for improvement. I guess one other question is about the base image. Will Mojo core be updating the release version as new Perl versions are released? Might it be better to use :latest rather than 5.32?
Usage: APPLICATION generate dockerfile [OPTIONS] | ||
|
||
mojo generate dockerfile | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think it might be worth mentioning that generating a Makefile is also required for getting this to work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But this is not really the place. That's what we will have the cookbook recipe for.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it really becomes a problem for people, we will just add a check in the code for a Makefile.PL
or cpanfile
and print a warning when generating the Dockerfile
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess I'm fine with having it in the cookbook. It was just the first thing that bit me when I generated a helloworld app for testing the generator. (The second was that I used mojo generate for the dockerfile instead of ./script/myapp generate :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've adjusted the examples to use ./script/my_app generate dockerfile
consistently, which hopefully is an acceptable first step to help encourage appropriate usage? 😇
The default could probably be |
Pull request has been modified.
Really appreciate the reviews! ❤️ I've updated with the suggestions. 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
Summary
This adds a very basic implementation of
./script/myapp generate dockerfile
- enough to get users started quickly.Motivation
Docker is a simple and useful way to deploy software, and we might as well help users get started!
References
Closes #1600
(As always, happy to rebase, amend, force push, close, defer, discuss, etc ❤️)