This directory contains the Docker image configuration for the delve-debugger tool.
- Dockerfile: Multi-stage Docker build configuration for the delve-debugger image
- entrypoint.sh: Container entrypoint script that attaches Delve to a running process
- VERSIONS.md: Version tracking and update policy documentation
- test-dockerfile.sh: Validation script to test Dockerfile syntax and versions
From the repository root:
make buildThis will:
- Extract version numbers from the Dockerfile
- Build the image with appropriate tags
- Tag as:
ghcr.io/moio/delve-debugger:${DLV_VERSION}-${DELVE_DEBUGGER_VERSION}
cd package/
docker build -t delve-debugger:latest .docker build \
--build-arg GO_VERSION=1.25 \
--build-arg DLV_VERSION=1.25.2 \
--build-arg DELVE_DEBUGGER_VERSION=1 \
-t delve-debugger:1.25.2-1 \
.Run the validation script to test the Dockerfile:
./test-dockerfile.shThis will:
- Extract and display current version numbers
- Attempt to build the Docker image (if network access available)
- Verify Delve version in the built image
- Fall back to basic syntax validation if build fails
When network access is available:
=== Delve Debugger Dockerfile Test ===
Extracting versions from Dockerfile...
GO_VERSION: 1.25
DLV_VERSION: 1.25.2
DELVE_DEBUGGER_VERSION: 1
Attempting Docker build...
✓ Dockerfile built successfully
✓ Delve version matches expected: 1.25.2
=== All tests passed! ===
When network access is restricted:
=== Basic validation passed! ===
Note: Full Docker build test requires network access to SUSE registry.
When updating versions:
-
Research latest stable versions:
- Go: Check SUSE package repositories
- Delve: Check https://github.com/go-delve/delve/releases
- Base image: Check SUSE Linux Enterprise release notes
-
Update
Dockerfile:- Modify
ARG GO_VERSION=X.XX - Modify
ARG DLV_VERSION=X.XX.X - Increment
ARG DELVE_DEBUGGER_VERSION=X - Update comments with verification date
- Modify
-
Update
VERSIONS.md:- Update version numbers
- Update "Last Updated" date
- Add any relevant notes
-
Test the build:
./test-dockerfile.sh make build
-
Commit changes:
git add Dockerfile VERSIONS.md git commit -m "Bump versions to Go X.XX and Delve X.XX.X"
- Base Image: SUSE Linux Enterprise 15 SP7 (registry.suse.com/suse/sle15:15.7)
- Go: 1.25 (SUSE package, corresponds to Go 1.25.x)
- Delve: 1.25.2 (latest stable release)
- Internal Version: 1
See VERSIONS.md for detailed version information.
- Docker or compatible container runtime
- Network access to SUSE Container Registry (registry.suse.com)
- For testing: Bash shell
ERROR: failed to authorize: failed to fetch anonymous token
Solution: This is a network connectivity issue. Ensure you have:
- Internet access
- Access to registry.suse.com
- No firewall blocking the connection
ERROR: Package 'goX.XX' not found
Solution: The specified Go version may not be available in SUSE repositories. Check:
- Available versions:
docker run --rm registry.suse.com/suse/sle15:15.7 zypper search go - Update
GO_VERSIONin Dockerfile to an available version
go: downloading github.com/go-delve/delve vX.XX.X failed
Solution:
- Verify the Delve version exists at https://github.com/go-delve/delve/releases
- Check network connectivity
- Try a different version