fix: add maxun browser image#1114
Conversation
WalkthroughThe ChangesBrowser Service Image Switch
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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: 1
🧹 Nitpick comments (1)
docker-compose.yml (1)
84-84: ⚖️ Poor tradeoffPin the image to a specific version instead of using
:latest.Using the
:latesttag creates stability and reproducibility risks:
- Different environments may pull different versions of the image
- No ability to roll back to a previous version if issues arise
- Difficult to debug when the image changes unexpectedly
- Build cache invalidation can cause surprising behavior
Consider using a specific version tag (e.g.,
getmaxun/maxun-browser:v1.0.0or a commit SHA digest).📌 Recommended approach for version pinning
- image: getmaxun/maxun-browser:latest + image: getmaxun/maxun-browser:v1.0.0 # or use digest: getmaxun/maxun-browser@sha256:...🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docker-compose.yml` at line 84, The image specification for getmaxun/maxun-browser is currently using the `:latest` tag which causes reproducibility and stability issues. Replace the `:latest` tag with a specific version tag (such as a semantic version like `v1.0.0` or a commit SHA digest) to ensure the same image is pulled consistently across different environments and to maintain the ability to rollback if needed.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docker-compose.yml`:
- Around line 78-84: The docker-compose.yml file references a non-existent
prebuilt image getmaxun/maxun-browser:latest while the local build configuration
has been commented out. Uncomment the build block (context, dockerfile, and args
with BROWSER_WS_PORT and BROWSER_HEALTH_PORT) for the browser service and remove
the image reference line so that Docker builds the image locally from the
browser/Dockerfile instead of attempting to pull a non-existent image from
Docker Hub.
---
Nitpick comments:
In `@docker-compose.yml`:
- Line 84: The image specification for getmaxun/maxun-browser is currently using
the `:latest` tag which causes reproducibility and stability issues. Replace the
`:latest` tag with a specific version tag (such as a semantic version like
`v1.0.0` or a commit SHA digest) to ensure the same image is pulled consistently
across different environments and to maintain the ability to rollback if needed.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
| # build: | ||
| # context: . | ||
| # dockerfile: browser/Dockerfile | ||
| # args: | ||
| # BROWSER_WS_PORT: ${BROWSER_WS_PORT:-3001} | ||
| # BROWSER_HEALTH_PORT: ${BROWSER_HEALTH_PORT:-3002} | ||
| image: getmaxun/maxun-browser:latest |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify the prebuilt Docker image exists and check basic metadata
echo "=== Checking if image exists on Docker Hub ==="
curl -s "https://hub.docker.com/v2/repositories/getmaxun/maxun-browser/tags/latest" | jq -r '.name, .last_updated'
echo -e "\n=== Checking local Dockerfile build args usage ==="
if [ -f browser/Dockerfile ]; then
echo "Found browser/Dockerfile, checking ARG usage:"
grep -n "ARG BROWSER_WS_PORT\|ARG BROWSER_HEALTH_PORT\|ENV BROWSER_WS_PORT\|ENV BROWSER_HEALTH_PORT" browser/Dockerfile || echo "No matching ARG/ENV declarations found"
else
echo "browser/Dockerfile not found (this is expected per PR objectives)"
fi
echo -e "\n=== Checking server.ts port usage ==="
if [ -f browser/server.ts ]; then
grep -n "BROWSER_WS_PORT\|BROWSER_HEALTH_PORT" browser/server.ts | head -10
fiRepository: getmaxun/maxun
Length of output: 1124
The prebuilt image getmaxun/maxun-browser:latest does not exist on Docker Hub.
The docker-compose.yml references a prebuilt image that is not available. This will cause Docker to fail when attempting to pull it. The local build configuration has been commented out, leaving no valid way to obtain the image.
Either:
- Push the prebuilt image to Docker Hub at
getmaxun/maxun-browser:latest, or - Restore the local build configuration (lines 78-83) to rebuild the image from source
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docker-compose.yml` around lines 78 - 84, The docker-compose.yml file
references a non-existent prebuilt image getmaxun/maxun-browser:latest while the
local build configuration has been commented out. Uncomment the build block
(context, dockerfile, and args with BROWSER_WS_PORT and BROWSER_HEALTH_PORT) for
the browser service and remove the image reference line so that Docker builds
the image locally from the browser/Dockerfile instead of attempting to pull a
non-existent image from Docker Hub.
What this PR does?
Fixes the bug wherein the docker build resulted in an error if the browser directory from the repo was not present.
Fixes: #1112
Summary by CodeRabbit