Closed cromedome closed 3 years ago
So, to confirm, something like:
on "blazing-speed" => sub {
requires "URL::Encode::XS" => "0";
requires "CGI::Deurl::XS" => "0";
requires "HTTP::Parser::XS" => "0";
requires "CBOR::XS" => "0";
requires "YAML::XS" => "0";
requires "Class::XSAccessor" => "0";
requires "Cpanel::JSON::XS" => "0";
requires "Crypt::URandom" => "0";
requires "HTTP::XSCookies" => "0";
requires "HTTP::XSHeaders" => "0";
requires "Math::Random::ISAAC::XS" => "0";
requires "MooX::TypeTiny" => "0";
requires "Scope::Upper" => "0";
requires "Type::Tiny::XS" => "0";
};
then in the Dockerfile
:
cpanm --installdeps . --notest --with-blazing-speed
?
So, to confirm, something like:
on "blazing-speed" => sub { requires "URL::Encode::XS" => "0"; requires "CGI::Deurl::XS" => "0"; requires "HTTP::Parser::XS" => "0"; requires "CBOR::XS" => "0"; requires "YAML::XS" => "0"; requires "Class::XSAccessor" => "0"; requires "Cpanel::JSON::XS" => "0"; requires "Crypt::URandom" => "0"; requires "HTTP::XSCookies" => "0"; requires "HTTP::XSHeaders" => "0"; requires "Math::Random::ISAAC::XS" => "0"; requires "MooX::TypeTiny" => "0"; requires "Scope::Upper" => "0"; requires "Type::Tiny::XS" => "0"; };
then in the
Dockerfile
:cpanm --installdeps . --notest --with-blazing-speed
?
Well cpanfile docs say:
Describe requirements for a specific phase. Available phases are configure, build, test, runtime and develop.
I thought of "feature accelerate".
Was spitballing a bit. Just wanted to make sure we were on the same page. Thanks for the info, I'll rework.
Keeping this open for now, but will reimplement against new CLI when it is ready.
Closing in favor of #1614.
Giving credit where credit is due: I shamelessly stole the sample Dockerfile from Mojolicious. To be fair, this has been on my list for about six months now, but them releasing the feature finally motivated me to do something about it.
You can now run
dancer2 gen
with a-c
or--docker
option to produce a minimalist Dockerfile for your application. Thegen
command will even give you some instructions for how to run it.This could use a proper deployment guide, but that can be handled in one of the various documentation issues that exist.