feat: docker release build locally without goreleaser#138
Conversation
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 37 minutes and 41 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
WalkthroughThe changes introduce Docker build and run functionality to the project. New Make targets enable local Docker image building without external dependencies ( Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docs/content/development/setup.md`:
- Around line 223-224: The Makefile's docker-run target is invoking the
published image ghcr.io/thushan/olla:latest instead of the locally built image
from the docker-build-local target; update the docker-run target to reference
the local image tag used by docker-build-local (e.g., change
ghcr.io/thushan/olla:latest to ghcr.io/thushan/olla:local or to the Makefile
variable that points to the local image like $(LOCAL_IMAGE)) so the convenience
alias runs the locally built image; ensure docker-build-local and docker-run use
the same image name/tag variable (docker-build-local builds $(LOCAL_IMAGE) and
docker-run runs $(LOCAL_IMAGE)).
- Around line 216-221: Update the Docker run example to warn readers that the
mounted config's server.host must be 0.0.0.0 for Docker networking to work;
specifically, add a brief note near the docker run snippet referencing the
config key server.host (used in config/config.local.yaml) and explain that
server.host: localhost will bind to loopback inside the container and prevent
published ports from being reachable, so they should set server.host: 0.0.0.0
when running the container.
In `@makefile`:
- Line 222: Replace the Bash-only redirection in the Make recipe that checks for
goreleaser — the command starting with `@if ! command -v goreleaser &>
/dev/null; then \` — with the POSIX-compatible form `> /dev/null 2>&1`;
specifically change `&> /dev/null` to `> /dev/null 2>&1` so the `command -v
goreleaser` check works under /bin/sh like the other checks in the file.
- Around line 211-216: The docker-build-local target currently builds the binary
for the host platform; change it to cross-compile for Linux by invoking go build
with GOOS=linux and GOARCH=amd64 (matching other cross-compilation targets) so
the produced olla binary is compatible with the Alpine image copied into the
Dockerfile; update the docker-build-local target's build step (the line that
calls go build -o olla) to prefix it with GOOS=linux GOARCH=amd64 (or use the
same GOOS/GOARCH vars used elsewhere) and ensure the rest of the target (docker
build and rm -f olla) remains unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: a3a37707-ea89-434d-8b1c-6264ab4e13f2
📒 Files selected for processing (5)
.gitignoreCLAUDE.mddocs/content/development/setup.mdmakefilereadme.md
lets you build docker image locally without goreleaser
Addresses #135 comment.
Summary by CodeRabbit
New Features
docker-build-localcommand to build Docker images locally without external dependencies.docker-runcommand for easy container execution with pre-configured settings.Documentation