Set up project Dockerfiles from official upstream tags, and docker-compose.yml #9
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
webgrip/invoiceninja-application#9
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Ryangr0 on GitHub.
Originally assigned to: @Copilot on GitHub.
Set up project Dockerfiles from official upstream tags, and docker-compose.yml
Summary
Adopt a self-maintained image policy for this project. For every dependency and service, maintain a Dockerfile under
ops/docker/<service>/Dockerfilethat directlyFROMs the official upstream image using a pinned, immutable tag. Build from those Dockerfiles and use only our images indocker-compose.yml. The provided Makefile is the canonical interface for local lifecycle commands.Scope
Policy (authoritative)
Own every image. Each service has an org-owned image built from
ops/docker/<service>/Dockerfile.Upstream as base. Each Dockerfile must begin with a direct
FROM <official-upstream>:<exact-tag>.:latest, except for the tags we assign the built images indocker-compose.yml.ARGindirection for base selection.Minimal overlay. Dockerfiles add only what is strictly required by this project (configuration, init hooks, site files). Avoid base OS swaps, build toolchains, or unrelated utilities. Use multi-stage only when necessary. Do not add configuration unless the upstream image requires it, or you deem it necessary.
Compose uses our images only.
docker-compose.ymlmust reference the org-owned images (not upstream) for all services.Add environment variables to
.env.exampleas needed for each service according to the upstream documentation.Port hygiene. Internal application process ports remain internal to the Compose network. Only the reverse proxy publishes host ports.
Configuration fidelity. Environment variables, volume mounts, health checks, and entrypoint behavior must match the upstream documentation of the chosen base image. Values are provided via the project’s env file and Compose.
Reproducibility. A clean clone plus the Makefile targets must build, start, and operate the stack without manual steps.
Security & provenance. Keep upstream base pins explicit; document chosen upstream tag(s) and changelog links in the PR. Avoid unverified third-party layers.
Image naming (required)
Organization registry namespace is authoritative.
Image names follow the stack.service pattern under the org namespace. Take this as an example of one of the services:
webgrip/invoiceninja-application.applicationwebgrip/invoiceninja-application.nginxwebgrip/invoiceninja-application.mariadbwebgrip/invoiceninja-application.rediswebgrip/invoiceninja-application.mkcertAdditional services must follow the same naming convention.
Tagging (required)
Repository layout (required)
ops/docker/<service>/Dockerfile.docker-compose.ymlis the single source of truth for local development; no parallel dev compose files.Dockerfile requirements (mandatory)
FROMto the official upstream image with an exact tag.Compose requirements (mandatory)
ops/docker/<service>/Dockerfile.Makefile integration (mandatory)
The provided Makefile is the canonical developer interface for local lifecycle.
Targets must function on a clean clone with Docker and Compose installed:
startbrings up the full stack in the background.stoptears it down.logsstreams logs (all services or a selected service).enterattaches an interactive shell to the application service.runexecutes one-off commands in the application service.Compose and service names used in the Makefile must remain in sync with
docker-compose.yml.Documentation (mandatory)
Validation (must pass)
make startresults in a working stack without manual intervention.make stopshuts down cleanly with no orphaned resources.Risks & mitigations
Acceptance criteria (checklist)
ops/docker/<service>/Dockerfile, eachFROMthe official upstream image with a pinned exact tag and noARG.docker-compose.ymlreferences only the org images and aligns with the Makefile service names.Definition of done
The repository contains a complete, reproducible, and documented containerization setup in which every service runs from org-owned images built from pinned upstream bases, the Makefile is the single entry point for local operations, Compose references only our images.