docker updates, missing wait-for-pid #2325
No reviewers
Labels
No labels
1week
2weeks
Failed compliance check
IP cameras
NATS
Possible security concern
Review effort 1/5
Review effort 2/5
Review effort 3/5
Review effort 4/5
Review effort 5/5
UI
aardvark
accessibility
amd64
api
arm64
auth
back-end
bgp
blog
bug
build
checkers
ci-cd
cleanup
cnpg
codex
core
dependencies
device-management
documentation
duplicate
dusk
ebpf
enhancement
eta 1d
eta 1hr
eta 3d
eta 3hr
feature
fieldsurvey
github_actions
go
good first issue
help wanted
invalid
javascript
k8s
log-collector
mapper
mtr
needs-triage
netflow
network-sweep
observability
oracle
otel
plug-in
proton
python
question
reddit
redhat
research
rperf
rperf-checker
rust
sdk
security
serviceradar-agent
serviceradar-agent-gateway
serviceradar-web
serviceradar-web-ng
siem
snmp
sysmon
topology
ubiquiti
wasm
wontfix
zen-engine
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
carverauto/serviceradar!2325
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "refs/pull/2325/head"
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?
Imported from GitHub pull request.
Original GitHub pull request: #1781
Original author: @mfreeman451
Original URL: https://github.com/carverauto/serviceradar/pull/1781
Original created: 2025-10-16T03:04:23Z
Original updated: 2025-10-16T03:25:42Z
Original head: carverauto/serviceradar:bug/docker_nginx_not_starting
Original base: main
Original merged: 2025-10-16T03:25:36Z by @mfreeman451
PR Type
Bug fix, Enhancement
Description
Updated nginx service to use custom Docker image with
wait-for-porttoolAdded multi-stage build to compile
wait-for-portutility from Go sourceIntegrated common tools layer into nginx image build configuration
Fixed nginx container startup issues by including missing dependencies
Diagram Walkthrough
File Walkthrough
docker-compose.yml
Switch to custom nginx Docker imagedocker-compose.yml
ghcr.io/carverauto/serviceradar-nginx:latestnginx:alpineimage with custom-built versionBUILD.bazel
Include common tools in nginx Bazel builddocker/images/BUILD.bazel
common_tools_amd64layer to nginx image tars listDockerfile.nginx
Add wait-for-port tool via multi-stage builddocker/compose/Dockerfile.nginx
wait-for-porttoolwait-for-portbinary from builder stage to nginx imagewait-for-portutilityImported GitHub PR comment.
Original author: @qodo-code-review[bot]
Original URL: https://github.com/carverauto/serviceradar/pull/1781#issuecomment-3408989208
Original created: 2025-10-16T03:04:48Z
You are nearing your monthly Qodo Merge usage quota. For more information, please visit here.
PR Compliance Guide 🔍
Below is a summary of compliance checks for this PR:
Healthcheck exposure
Description: The HEALTHCHECK uses wget against http://localhost without pinning package versions or
TLS, which could be acceptable but may leak internal service availability if the container
network is exposed; verify that health endpoint does not expose sensitive info and wget is
available in final image.
Dockerfile.nginx [46-47]
Referred Code
🎫 No ticket provided
Codebase context is not defined
Follow the guide to enable codebase context checks.
No custom compliance provided
Follow the guide to enable custom compliance check.
Compliance status legend
🟢 - Fully Compliant🟡 - Partial Compliant
🔴 - Not Compliant
⚪ - Requires Further Human Verification
🏷️ - Compliance label
Imported GitHub PR comment.
Original author: @qodo-code-review[bot]
Original URL: https://github.com/carverauto/serviceradar/pull/1781#issuecomment-3408990760
Original created: 2025-10-16T03:05:51Z
You are nearing your monthly Qodo Merge usage quota. For more information, please visit here.
PR Code Suggestions ✨
Explore these optional code suggestions:
Execute the newly added utility
The
wait-for-portutility is not being used. Add anENTRYPOINTto the Dockerfileto execute the
docker/compose/entrypoint-nginx.shscript, which should run theutility before starting nginx.
docker/compose/Dockerfile.nginx [32-36]
Suggestion importance[1-10]: 9
__
Why: This suggestion correctly points out a critical functional omission where the
wait-for-portutility is added to the image but never executed, defeating its purpose.Copy all source code for build
To prevent potential build failures from missing local dependencies, copy the
entire
cmddirectory and other relevant source directories, not just thespecific
waitforporttool directory.docker/compose/Dockerfile.nginx [24-25]
Suggestion importance[1-10]: 6
__
Why: The suggestion correctly identifies a potential build failure if the
waitforporttool has local dependencies, improving the build's robustness by copying more source code.Consider using a standard utility
Replace the custom-built Go
wait-for-portutility with a standard, pre-existingtool like
wait-for-it.shordockerize. This change would simplify the Dockerbuild process and reduce maintenance overhead.
Examples:
docker/compose/Dockerfile.nginx [15-33]
Solution Walkthrough:
Before:
After:
Suggestion importance[1-10]: 8
__
Why: This is a strong architectural suggestion that correctly identifies the unnecessary complexity and maintenance overhead of building a custom tool for a common problem, proposing a simpler, standard alternative.