Skip to content

Fix Dockerfile destination when generating applications - #1859

Closed
sjh9714 wants to merge 3 commits into
PerlDancer:mainfrom
sjh9714:codex/20261016-1851-dockerfile-path
Closed

sjh9714 wants to merge 3 commits into
PerlDancer:mainfrom
sjh9714:codex/20261016-1851-dockerfile-path

Conversation

@sjh9714

@sjh9714 sjh9714 commented Oct 16, 2026

Copy link
Copy Markdown

Fixes #1851.

dancer2 gen -c -a My::App --path out puts the Dockerfile in My::App/ instead of out/My-App/. It also leaves an entry pointing outside the application in MANIFEST.

Use the resolved application directory for the Dockerfile, as for the other generated files. The regression test covers both the default directory and an explicit -d, including the MANIFEST entry.

Tested on macOS with Perl 5.34.1 and Cpanel::JSON::XS 4.80:

PERL5LIB=/tmp/creator-dancer2-perl/lib/perl5 prove -lr t/
PERL5LIB=/tmp/creator-dancer2-perl/lib/perl5 /tmp/creator-dancer2-perl/bin/dzil build --in /tmp/creator-dancer2-final-build-20261016

The suite passes (209 files, 1,683 tests, with optional-dependency skips), as does the build. The new regression fails without the fix. I also checked the generator test with a CRLF Dockerfile template; Windows itself was not tested.

@sjh9714 sjh9714 closed this Oct 23, 2026
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.

dancer2 gen -c writes the Dockerfile outside the app directory

1 participant