Skip to content

feat:docker packaging#269

Merged
fahimfaisaal merged 3 commits into
mainfrom
feat/docker-packaging
Jul 24, 2026
Merged

feat:docker packaging#269
fahimfaisaal merged 3 commits into
mainfrom
feat/docker-packaging

Conversation

@hfl0506

@hfl0506 hfl0506 commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Related Issue

Closes #254

Changes

  • Added multi-stage Docker build for UI embedding and Linux Go binary
    compilation.

  • Uses minimal distroless nonroot runtime image.

  • Preserves CLI argument override and default API server command.

  • Added .dockerignore for smaller build context.

  • Added Compose configuration with local build and loopback port binding.

  • Verified with Docker build, CLI/API smoke tests, Compose, and full pre-
    submit checks.

Test Result

Docker

docker build --no-cache -t vizb:local .

docker run --rm vizb:local --help
docker run --rm vizb:local bar --help

docker run --rm -d \
    --name vizb-smoke \
    -p 127.0.0.1:8080:8080 \
    vizb:local
    
 curl -sS -o /dev/null -w '%{http_code}\n' \
    http://127.0.0.1:8080/
# expected 405
 
curl -sS -o /dev/null -w '%{http_code}\n' \
    -X POST http://127.0.0.1:8080/ \
    -H 'Content-Type: application/json' \
    -H 'Accept: application/json' \
    -d '{"input":"x,y\na,1\n","parser":"csv"}'

# expected: 200

Docker Compose

docker compose up --build -d
docker compose ps

curl -sS -o /dev/null -w '%{http_code}\n' http://127.0.0.1:8080/
# Expected: 405

Summary by CodeRabbit

  • New Features
    • Added Docker support for building and running the application in a production-ready container.
    • Added Docker Compose configuration for launching the service locally on port 8080.
  • Chores
    • Reduced Docker build context by excluding development files, caches, dependencies, and build artifacts.

@hfl0506 hfl0506 added this to the Release v0.17.0 milestone Jul 24, 2026
@hfl0506
hfl0506 requested a review from fahimfaisaal as a code owner July 24, 2026 02:04
@hfl0506 hfl0506 added enhancement New feature or request dx developer experience-related works api api related works labels Jul 24, 2026
@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Adds Docker packaging for Vizb: a multi-stage UI and Go build, a distroless runtime image, Docker context exclusions, and a Compose service exposing port 8080 locally.

Changes

Container packaging

Layer / File(s) Summary
Multi-stage image build
.dockerignore, Dockerfile
Docker build context exclusions are added, and the Dockerfile builds the embedded UI and Go binary before creating a non-root distroless image with default serve arguments.
Compose runtime wiring
compose.yaml
A vizb service builds from the local directory and maps container port 8080 to host loopback port 8080.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related issues

  • #253 — The added Dockerfile, Compose file, and Docker ignore rules implement the requested container packaging.
  • #256 — The Compose port mapping and Docker usage support the related documentation objective.

Suggested reviewers: fahimfaisaal

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning [#254] The PR delivers Docker files, but it introduces an in-Docker multi-stage build, which the issue explicitly marked out of scope. Use a thin Dockerfile that copies the prebuilt vizb binary, and keep UI/Go build steps outside the container build path.
Out of Scope Changes check ⚠️ Warning The Dockerfile adds UI and Go compilation inside Docker, which goes beyond the requested packaging-only scope. Remove the multi-stage application build from Docker and keep the image definition limited to copying the released binary.
✅ Passed checks (3 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise and clearly reflects the main change: adding Docker packaging.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Comment @coderabbitai help to get the list of available commands.

@hfl0506 hfl0506 changed the title feat():docker packaging feat:docker packaging Jul 24, 2026

@fahimfaisaal fahimfaisaal left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Well Done, @hfl0506

@fahimfaisaal
fahimfaisaal merged commit da5b01b into main Jul 24, 2026
1 check passed
@fahimfaisaal
fahimfaisaal deleted the feat/docker-packaging branch July 24, 2026 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api api related works dx developer experience-related works enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feat]: Add Dockerfile and compose.yaml for Vizb

2 participants