Skip to content

Conversation

@Anmol1696
Copy link
Contributor

@Anmol1696 Anmol1696 commented Oct 16, 2025

Closes: #247

New way to build and push docker images.
Create workflow to build and push docker image, add version for each of the docker

Copy link
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

Unifies Docker image builds across postgis, pgvector, and node-sqitch by parameterizing Dockerfiles, introducing per-image version.yaml files, and adding a GitHub Actions workflow to build/push multi-arch images.

  • Introduces centralized docker/Makefile to build/push images for multiple processes and versions.
  • Parameterizes Dockerfiles with BASE and BASE_VERSION args and adds repository source labels.
  • Adds .github/workflows/docker.yaml to build (PRs) and build+push (push/dispatch) images to GHCR.

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
docker/postgis/version.yaml Declares base image and versions for postgis build matrix.
docker/postgis/Dockerfile Parameterized base image; added label; installs packages.
docker/pgvector/version.yaml Declares base image and versions for pgvector build matrix.
docker/pgvector/Dockerfile Parameterized base; revised build steps for pgvector extension.
docker/node-sqitch/version.yaml Declares base image and versions for node-sqitch build matrix.
docker/node-sqitch/Dockerfile Parameterized base in multi-stage build; added labels.
docker/Makefile New unified targets to build/push per process and per version from version.yaml.
.github/workflows/docker.yaml New workflow to build (PR) and build+push (push/dispatch) images to GHCR.
Comments suppressed due to low confidence (1)

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

docker/Makefile Outdated
Comment on lines 19 to 21
@BASE=$$(sed -n 's/^base:[[:space:]]*//p' $(PROCESS)/version.yaml | head -n1); \
VERSIONS=$$(sed -n '/^versions:/,$$p' $(PROCESS)/version.yaml | sed -n 's/^-\s*//p'); \
if [ -z "$$BASE" ] || [ -z "$$VERSIONS" ]; then \
Copy link

Copilot AI Oct 16, 2025

Choose a reason for hiding this comment

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

'\s' is not a valid character class in POSIX/GNU sed; VERSIONS will be empty and the build will fail. Use POSIX classes and allow optional indentation: replace the inner sed with sed -n 's/^[[:space:]]-[[:space:]]//p'.

Copilot uses AI. Check for mistakes.
docker/Makefile Outdated
Comment on lines 36 to 38
@BASE=$$(sed -n 's/^base:[[:space:]]*//p' $(PROCESS)/version.yaml | head -n1); \
VERSIONS=$$(sed -n '/^versions:/,$$p' $(PROCESS)/version.yaml | sed -n 's/^-\s*//p'); \
if [ -z "$$BASE" ] || [ -z "$$VERSIONS" ]; then \
Copy link

Copilot AI Oct 16, 2025

Choose a reason for hiding this comment

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

Same as above: '\s' is not recognized by sed. Update to sed -n 's/^[[:space:]]-[[:space:]]//p' so version items are parsed correctly.

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,3 @@
base: postgres
versions:
- 13.3-alpine
Copy link

Copilot AI Oct 16, 2025

Choose a reason for hiding this comment

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

[nitpick] YAML list items should be indented under the key; as written many YAML parsers will reject this. Prefer a valid YAML structure and (with the Makefile changes above) allow optional indentation: change to ' - 13.3-alpine'.

Suggested change
- 13.3-alpine
- 13.3-alpine

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,3 @@
base: node
versions:
- 20.12.0-alpine3.19
Copy link

Copilot AI Oct 16, 2025

Choose a reason for hiding this comment

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

[nitpick] Indent the list item for valid YAML: ' - 20.12.0-alpine3.19'.

Suggested change
- 20.12.0-alpine3.19
- 20.12.0-alpine3.19

Copilot uses AI. Check for mistakes.
Comment on lines 53 to 56
strategy:
matrix:
process: [pgvector, node-sqitch, postgis]
max-parallel: 3
Copy link

Copilot AI Oct 16, 2025

Choose a reason for hiding this comment

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

workflow_dispatch inputs (process, version) are defined but unused; this matrix always builds all processes, ignoring the user's selection. Gate the matrix on event type or add a dispatch-specific step/job that uses inputs.process and inputs.version (e.g., run make PROCESS='${{ inputs.process }}' VERSION='${{ inputs.version }}' build-push-process-version for workflow_dispatch).

Copilot uses AI. Check for mistakes.
@Anmol1696 Anmol1696 merged commit 896c65d into main Oct 23, 2025
5 of 6 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.

docker: make docker images part of packages and ghcr.io for launchql

2 participants