Change naming pattern for Dockerfiles to <purpose>.Dockerfile
Fixes #9245
@thaJeztah Could you PTAL?
But this creates another issue: we no longer have syntax highlighting out-of-the-box.
What IDE are you using? In my IDE, it's configured to Highlight Dockerfile, *.Dockerfile and Dockerfile.*.
Not a big fan of changing this, because the Dockerfiles now no longer group together
@thaJeztah Create a file like Dockerfile.php in PHPStorm or Microsoft VS code, it will think it's a "PHP" file because it's *.php.
I understand, but that's not at hand here; the Dockerfile.archive Dockerfile is only used by the docs team when creating an archive branch, so possibly we could even move it elsewhere if that's the biggest problem
Ah for Dockerfile.archive - I can revert that change.
Perhaps we could mention that people could setup their Dockerfiles like this:
/project
- /docker
- /php
- Dockerfile
- /nginx
- Dockerfile
- /mariadb
- Dockerfile
So that the path defines the grouping for the Dockerfile images?
I guess I just want to see some documentation to get people to avoid using a name like Dockerfile.php which could be parsed by PHP either in IDE or elsewhere π
@thaJeztah, I removed the changes to the Dockerfile.archive file
Deploy Preview for docsdocker ready!
Built without sensitive environment variables
| Name | Link |
|---|---|
| Latest commit | 835c6f8f33cea040c9b8a83ccb1e3e93169c69a9 |
| Latest deploy log | https://app.netlify.com/sites/docsdocker/deploys/62e2b891e4039e00083f70b3 |
| Deploy Preview | https://deploy-preview-10562--docsdocker.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site settings.
@dan2k3k4 @thaJeztah any updates on this topic?
Also what is currently more preferable without less issues in IDEs, Kubernetes etc.: Dockerfile.purpose vs purpose.Dockerfile?
Or is it still better to stay with the old approach like: root/docker/purpose/Dockerfile?
Regards, Thomas
@ThomasLohmann we've been using <service-name>.dockerfile (e.g. php.dockerfile) and VSCode (and I believe Jetbrains, e.g. PHPStorm) pick it up just fine for syntax highlighting.
@dan2k3k4 great! And there is no issue to deploy images in this way on Kubernetes?
@ThomasLohmann nope, uselagoon/lagoon-images repository is done this way too and that hosts several thousand different websites including the Australian government.
@dan2k3k4 perfect!
Let's hope that docker will support purpose.dockerfile instead of purpose.Dockerfile soon. Or even just purpose.docker. It would then be more like a real file extension.
The capitalisation doesn't matter. We use lowercase d in our images but the Lagoon repo is using uppercase, I think just for clarity.
Thanks for the pull request. We'd like to make our product docs better, but havenβt been able to review all the suggestions. As our docs have also diverged, we do not have the bandwidth to review and rebase old pull requests.
If the updates are still relevant, review our contribution guidelines and rebase your pull request against the latest version of the docs, then mark it as fresh with a /remove-lifecycle stale comment.
If not, this pull request will be closed in 30 days. This helps our maintainers focus on the active pull requests.
Prevent pull requests from auto-closing with a /lifecycle frozen comment.
/lifecycle stale