feat(docker): added Docker to project #44
No reviewers
Labels
No labels
bug
dependencies
documentation
duplicate
enhancement
github_actions
go
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
pokebedrock/gobds!44
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "main"
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?
Added configuration for Docker Compose and Docker to run an instance of proxy much easier by using Docker's containers.
Summary by CodeRabbit
New Features
Chores
CI
✏️ Tip: You can customize this high-level summary in your review settings.
📝 Walkthrough
Walkthrough
Adds containerization and Docker CI: a multi-stage Dockerfile, docker-compose service, .dockerignore, hadolint config, a Dockerfile lint job in CI, and Docker Buildx build-and-push steps in the release workflow.
Changes
Dockerfile,docker-compose.yamlgolang:1.24-alpine, runtime:alpine) that compiles a staticgobdsbinary and exposes UDP 19132; addeddocker-compose.yamlwithgobds-proxyservice, UDP port mapping, and host path mounts for config and resources..github/workflows/lint.yml,.github/workflows/release.ymldockerfilejob to lint the Dockerfile withhadolint; extended release workflow to set up Docker Buildx, log in toghcr.io, extract image metadata, and build & push the Docker image using the Dockerfile..hadolint.yamlDL3007andDL3018..dockerignore.dockerignoreexcluding IDE dirs (.idea),/mocks/, root-level config files (*.toml,*.json,*.lock), and executables (*.exe) from Docker build contexts.Sequence Diagram(s)
Estimated code review effort
🎯 3 (Moderate) | ⏱️ ~20 minutes
Poem
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings.
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.
❤️ Share
Comment
@coderabbitai helpto get the list of available commands and usage tips.Actionable comments posted: 2
🤖 Fix all issues with AI agents
🧹 Nitpick comments (1)
@ -0,0 +9,4 @@RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o gobds ./main.goFROM alpine:latest AS runner⚠️ Potential issue | 🟠 Major
🧩 Analysis chain
🌐 Web query:
hadolint DL3007 rule docker latest tag💡 Result:
Hadolint rule DL3007 warns against using the Docker "latest" tag for base images. Message: "Using latest is prone to errors if the image will ever update. Pin the version explicitly to a release tag." It exists because unpinned "latest" makes builds non-reproducible and can break when upstream images change. Fix: use a specific, versioned tag (e.g. FROM ubuntu:20.04 or FROM python:3.11-slim) instead of FROM ubuntu:latest or FROM python:latest. [1][2]
🌐 Web query:
Alpine Linux latest stable version production recommended 2025💡 Result:
As of Jan 19, 2026 the recommended production release series is Alpine 3.23 — use the latest point release in that series (e.g., 3.23.2). [1][2]
Sources
🏁 Script executed:
Repository: smell-of-curry/gobds
Length of output: 200
🏁 Script executed:
Repository: smell-of-curry/gobds
Length of output: 46
🏁 Script executed:
Repository: smell-of-curry/gobds
Length of output: 306
🏁 Script executed:
Repository: smell-of-curry/gobds
Length of output: 123
🏁 Script executed:
Repository: smell-of-curry/gobds
Length of output: 799
Replace
alpine:latestwith a specific version tag to fix the hadolint DL3007 error.The
FROM alpine:lateston line 12 triggers DL3007, which is not ignored by your workflow (only DL3008 is ignored). UseFROM alpine:3.23.2or a compatible pinned version instead to ensure reproducible builds and pass CI linting.🤖 Prompt for AI Agents
@ -0,0 +1,13 @@services:gobds:container_name: gobds-proxybuild:⚠️ Potential issue | 🟠 Major
🧩 Analysis chain
🌐 Web query:
Docker Compose specification service name field valid container_name💡 Result:
Yes — you can set a service’s container_name in Compose, but it must follow the Compose/ Docker container-name rules: pattern [a-zA-Z0-9][a-zA-Z0-9_.-]+ (starts with alnum, then alnum/underscore/dot/hyphen). If you set container_name the service cannot be scaled to >1 container (and names must be unique); container_name is ignored when deploying a stack in swarm mode. [1][2]
Sources:
🌐 Web query:
Docker Compose service "name" field invalid spec💡 Result:
That error happens because the top-level "name" key is part of the newer Compose Specification (project name), and older/older-style parsers (classic docker‑compose / mismatched compose-file versions) reject unknown top-level properties. Fixes:
Sources: Compose Specification (name top-level) and Docker docs; related GitHub/StackOverflow threads. [1][2][3]
🌐 Web query:
Docker Compose service level properties fields name vs container_name specification💡 Result:
Short answer
Important details
Sources
🌐 Web query:
Docker Compose "name:" field service invalid properties allowed💡 Result:
Short answer: Whether a top-level name: (or name: under networks/services) is allowed depends on which Compose schema/parser you’re using. The Compose specification (and Docker CLI "docker compose" v2 which implements it) accepts a top-level name field; the older docker‑compose (v1 Python tool) and some tools/validators still validate against older schemas and will report "Additional property 'name' is not allowed". Use the Compose v2 CLI (or a compose-spec‑aware parser) or remove/avoid that field for older parsers. [1][2][3]
What to do:
Sources:
🌐 Web query:
Docker Compose service properties allowed fields reference documentation💡 Result:
See the official Compose file reference (Docker Docs) for the full list of allowed service properties and details, and the Compose Specification for the canonical field definitions:
If you want, I can list the most common service keys (image, build, ports, volumes, environment, networks, depends_on, deploy, secrets, configs, etc.) with brief descriptions and which Compose/engine versions support them.
🏁 Script executed:
Repository: smell-of-curry/gobds
Length of output: 46
🌐 Web query:
Docker Compose service "name" property invalid not allowed specification💡 Result:
You're seeing that error because the Compose file you're using contains a top-level or resource "name" key that your Compose implementation/schema/version doesn't accept.
Key points and fixes
How to troubleshoot (quick)
References
🌐 Web query:
Compose specification service schema allowed fields list container_name💡 Result:
Yes — container_name is a valid service field in the Compose specification. Key points:
Sources: Compose spec and Docker Compose docs. [1] https://compose-spec.github.io/compose-spec/05-services.html [2] https://docs.docker.com/compose/compose-file/05-services/
nameis not a valid service field in Compose spec.Use
container_nameto set an explicit container name for the service; alternatively, set a top-levelname:for the project. Without this change, Compose validation will fail.Note: Setting
container_nameprevents the service from being scaled to multiple containers.Suggested fix
📝 Committable suggestion
🤖 Prompt for AI Agents
✅ Addressed in commit
beeffe9@cursor review
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
@ -0,0 +1,13 @@services:Volume mount path doesn't match expected config location
Medium Severity
The volume mount
./config:/app/configcreates a directory at/app/config, but the application'sReadConfig()function reads from./config.toml(which resolves to/app/config.tomlgiven theWORKDIR /appin the Dockerfile). Users placing theirconfig.tomlin a./config/directory on the host will have it mounted to/app/config/config.toml, not the expected/app/config.toml. The app will create a default config instead of using the user's configuration.@cursor review
Skipping Bugbot: Bugbot is disabled for this repository
LGTM