Fix: Restructure Dockerfile for cornucopia.owasp.org build context#2840
Merged
sydseter merged 1 commit intoOWASP:masterfrom Apr 19, 2026
Merged
Conversation
sydseter
approved these changes
Apr 19, 2026
Contributor
There was a problem hiding this comment.
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/Dockerfileto use build-context-relativeCOPYpaths and copysource/to/sourcefor prerendering. - Added a workflow step to copy the repo-root
source/directory into thecornucopia.owasp.orgbuild context before building the image. - Added
cornucopia.owasp.org/.dockerignoreto 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 tocornucopia.owasp.org, causing files likenginx.confto not be found.Changes
Dockerfileto use paths relative tocornucopia.owasp.orgbuild contextsource/into the build context before the Docker build (needed for SvelteKit prerendering).dockerignoreto keep the build context leanTested 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.