Skip to content

Fix: Restructure Dockerfile for cornucopia.owasp.org build context#2840

Merged
sydseter merged 1 commit intoOWASP:masterfrom
Mysterio-17:fix/docker-build-nginx-conf
Apr 19, 2026
Merged

Fix: Restructure Dockerfile for cornucopia.owasp.org build context#2840
sydseter merged 1 commit intoOWASP:masterfrom
Mysterio-17:fix/docker-build-nginx-conf

Conversation

@Mysterio-17
Copy link
Copy Markdown
Contributor

@Mysterio-17 Mysterio-17 commented Apr 19, 2026

Description

Fixes the Docker build failure in the ZAP website scan workflow. The Dockerfile was using repo-root-relative paths (cornucopia.owasp.org/...) while the build context was set to cornucopia.owasp.org, causing files like nginx.conf to not be found.

Changes

  • Restructured Dockerfile to use paths relative to cornucopia.owasp.org build context
  • Added a workflow step to copy source/ into the build context before the Docker build (needed for SvelteKit prerendering)
  • Added .dockerignore to keep the build context lean
    Tested locally — Docker build completes and the container serves the website successfully.

AI Usage

Used AI assistance to debug the build context mismatch. Docker configuration and fix were verified manually with a local build and container test.

Copilot AI review requested due to automatic review settings April 19, 2026 20:55
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes the cornucopia website Docker build in CI by aligning Dockerfile paths and build inputs with the cornucopia.owasp.org build context used by the ZAP nightly scan workflow.

Changes:

  • Updated cornucopia.owasp.org/Dockerfile to use build-context-relative COPY paths and copy source/ to /source for prerendering.
  • Added a workflow step to copy the repo-root source/ directory into the cornucopia.owasp.org build context before building the image.
  • Added cornucopia.owasp.org/.dockerignore to reduce unnecessary build context contents.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
cornucopia.owasp.org/Dockerfile Uses build-context-relative paths and ensures /source is present for SvelteKit prerendering during image build.
cornucopia.owasp.org/.dockerignore Excludes common local/build artifacts and env files from the Docker build context.
.github/workflows/zap-nightly-scan-website.yml Copies source/ into the build context so the website image can build successfully in the nightly ZAP scan.

Comment thread cornucopia.owasp.org/Dockerfile
Comment thread cornucopia.owasp.org/Dockerfile
@sydseter sydseter merged commit 8bc6c35 into OWASP:master Apr 19, 2026
11 of 13 checks passed
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.

3 participants