Skip to content

fix: update the Dockerfile - #149

Merged
airween merged 5 commits into
owasp-modsecurity:mainfrom
aryehb:fix/dockerfile
Aug 26, 2026
Merged

airween merged 5 commits into
owasp-modsecurity:mainfrom
aryehb:fix/dockerfile

Conversation

@aryehb

@aryehb aryehb commented Aug 26, 2026

Copy link
Copy Markdown
Contributor
  • Fix casing for AS.
    The mismatch between FROM and as triggered a warning on every build.
  • Fix CMD.
    • Each arg needs to be a separate array item.
    • Use the serve alias to match the non-Docker instructions in the README.
    • Bind hugo to 0.0.0.0 so the port can be forwarded to the host.
  • Update the Hugo download command.
    • Add error handling (-S, test).
    • Update the regex to be more specific.
      • Hugo has 2 variants that match hugo_extended: hugo_extended and hugo_extended_withdeploy. Update the regex to exclude the unwanted one.
      • Escape the dots and add anchors.
    • Don't use the version variable to name the assets.
        This is a temporary container, so there's no need for the version in the filename.
  • Fix downloading Sass.
    • Add error handling.
    • Update the regex to be more specific.
    • Don't use the version variable to name the assets.
        This is a temporary container, so there's no need for the version in the filename.
    • Move the entire dart-sass folder.
        sass is just a shell script that invokes the actual binary. The binary needs to be copied as well.
  • Update the README with instruction for Docker.

aryehb added 5 commits August 26, 2026 13:10
The mismatch between `FROM` and `as` triggered a warning on every build.
* Each arg needs to be a separate array item.
* Use the `serve` alias to match the non-Docker instructions in the
  README.
* Bind hugo to `0.0.0.0` so the port can be forwarded to the host.
* Add error handling (`-S`, `test`).
* Update the regex to be more specific.
  - Hugo has 2 variants that match `hugo_extended`: `hugo_extended` and
    `hugo_extended_withdeploy`. Update the regex to exclude the
    unwanted one.
  - Escape the dots and add anchors.
* Don't use the version variable to name the assets.
  This is a temporary container, so there's no need for the version in
  the filename.
* Add error handling.
* Update the regex to be more specific.
* Don't use the version variable to name the assets.
  This is a temporary container, so there's no need for the version in
  the filename.
* Move the entire `dart-sass` folder.
  `sass` is just a shell script that invokes the actual binary. The
  binary needs to be copied as well.
@aryehb

aryehb commented Aug 26, 2026

Copy link
Copy Markdown
Contributor Author

Tested locally, working properly.

@aryehb

aryehb commented Aug 26, 2026

Copy link
Copy Markdown
Contributor Author

The next step would be to add a CI job that built the container and checked that it's serving content. This would add a regression test to ensure that the Dockerfile works.

@airween

airween commented Aug 26, 2026

Copy link
Copy Markdown
Member

Thanks for this addition, @aryehb!

@airween
airween merged commit c91e1af into owasp-modsecurity:main Aug 26, 2026
1 check failed
@aryehb
aryehb deleted the fix/dockerfile branch August 27, 2026 18:14
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.

2 participants