Skip to content

fix: add localhost prefix to image names to prevent Docker registry auto-prefixing#1

Open
yoavkatz wants to merge 21 commits into
mainfrom
feature/exgentic-mcp-server
Open

fix: add localhost prefix to image names to prevent Docker registry auto-prefixing#1
yoavkatz wants to merge 21 commits into
mainfrom
feature/exgentic-mcp-server

Conversation

@yoavkatz

Copy link
Copy Markdown
Owner

Problem

Docker automatically adds docker.io/library/ prefix to unqualified image names, which causes:

  • Inconsistencies between Docker and Podman image naming
  • Breaks docker inspect commands when using short image names
  • Different behavior between the two container runtimes

Solution

Added localhost/ prefix to image names in build scripts. This:

  • Prevents Docker from auto-adding the docker.io/library/ prefix
  • Keeps images local (not pushed to any registry)
  • Ensures consistent naming across both Docker and Podman
  • Makes docker inspect and podman inspect work with the same image names

Changes

  • a2a/exgentic_agent/build.sh: Add localhost/ prefix to image names
  • mcp/exgentic_benchmarks/build.sh: Add localhost/ prefix to image names

Testing

After this change:

  • Images will be tagged as localhost/exgentic-a2a-AGENT:TAG and localhost/exgentic-mcp-BENCHMARK:TAG
  • docker inspect localhost/exgentic-mcp-tau2:latest will work correctly
  • Both Docker and Podman will reference images consistently

yoavkatz added 21 commits March 16, 2026 16:19
- Created Docker-based MCP server for Exgentic benchmarks
- Supports building images with specific benchmarks (e.g., tau2)
- Uses uv for fast package installation
- Includes git configuration to handle large repository clones
- Benchmark is installed at build time for faster startup
- Configurable HOST/PORT via environment variables
- Runs as non-root user (UID 1001)
- Comprehensive documentation with examples
- Successfully tested with tau2 benchmark (114 tasks loaded)

Signed-off-by: Yoav Katz <katz@il.ibm.com>
- Modified entrypoint.sh to support EXGENTIC_SET_* environment variables
- Environment variables are converted to --set arguments for exgentic mcp command
- Format: EXGENTIC_SET_BENCHMARK_USER_SIMULATOR_MODEL -> --set benchmark.user_simulator_model
- Updated README with detailed documentation and examples
- Added common parameter list and usage examples
- Supports setting user_simulator_model, agent_model, max_steps, and other benchmark parameters

Signed-off-by: Yoav Katz <katz@il.ibm.com>
Signed-off-by: Yoav Katz <katz@il.ibm.com>
Signed-off-by: Yoav Katz <katz@il.ibm.com>
- Updated Dockerfile permissions for Kubernetes compatibility (group permissions)
- Changed ownership from 1001:1001 to 1001:0 for OpenShift/Kubernetes
- Added group read/write/execute permissions (g+rwX)
- Added --disable-dns-rebinding-protection flag to allow Kubernetes service access
- This fixes the 'Invalid Host header' error when accessing from within cluster

Signed-off-by: Yoav Katz <katz@il.ibm.com>
Signed-off-by: Yoav Katz <katz@il.ibm.com>
Signed-off-by: Yoav Katz <katz@il.ibm.com>
- Added ENV HOME=/app after USER 1001 to ensure proper home directory
- Deleted .env.openai (replaced with benchmark-specific env files)
- This ensures tools/libraries write to /app where user has permissions

Signed-off-by: Yoav Katz <katz@il.ibm.com>
- Install git-lfs package alongside git
- Initialize git-lfs after installation
- Update comment to reflect git-lfs requirement

Signed-off-by: Yoav Katz <katz@il.ibm.com>
Signed-off-by: Yoav Katz <katz@il.ibm.com>
Signed-off-by: Yoav Katz <katz@il.ibm.com>
- Add Dockerfile for building Exgentic agents with A2A protocol support
- Add entrypoint.sh for runtime configuration and MCP integration
- Add build.sh script with auto-detection of docker/podman
- Add comprehensive README with usage examples and configuration
- Add .dockerignore for optimized build context
- Add .env.example and .env.advanced for configuration templates
- Support runtime configuration via EXGENTIC_SET_* environment variables
- Implement MCP server integration via --mcp flag
- Run as non-root user (UID 1001) for security

Signed-off-by: Yoav Katz <katz@il.ibm.com>
- Change build scripts to accept agent/benchmark as positional argument
- Replace --no-cache with --use-cache flag (builds without cache by default)
- Update argument parsing to support --tag and --use-cache as optional flags
- Improve help messages with clearer usage examples
- Update README files to reflect new command syntax
- Default behavior: builds without cache for consistency
- Optional: use --use-cache to enable Docker cache during builds

Signed-off-by: Yoav Katz <katz@il.ibm.com>
Signed-off-by: Yoav Katz <katz@il.ibm.com>
- Set HOME=/app before running exgentic install during build
- This ensures benchmark data is installed to /app/.exgentic/ instead of /root/.exgentic/
- Fixes runtime error where benchmark data files were not found
- Remove duplicate HOME environment variable declaration

Signed-off-by: Yoav Katz <katz@il.ibm.com>
… deployment

- Changed user UID from 1001 to 1000 to match Kubernetes securityContext
- Set home directory to /app during user creation with useradd -d flag
- Added explicit HOME=/app environment variable after USER directive
- Added HOME export in entrypoint.sh to ensure propagation to child processes
- Added TAU2_DATA_DIR environment variable for benchmark data location

This fixes the 'RuntimeError: Could not determine home directory' error
that occurred when Exgentic spawned child processes in Kubernetes. The
issue was caused by a mismatch between the Kubernetes runAsUser (1000)
and the Dockerfile user UID (1001), resulting in no /etc/passwd entry
for the running process, which prevented Python's Path.expanduser()
from resolving the home directory in child processes.

Signed-off-by: Yoav Katz <katz@il.ibm.com>
Signed-off-by: Yoav Katz <katz@il.ibm.com>
Signed-off-by: Yoav Katz <katz@il.ibm.com>
- Install datasets package for direct access to GSM8K and other benchmarks
- Add newline at end of file

Signed-off-by: Yoav Katz <katz@il.ibm.com>
Signed-off-by: Yoav Katz <katz@il.ibm.com>
…uto-prefixing

Docker automatically adds 'docker.io/library/' prefix to unqualified image names,
which causes inconsistencies between Docker and Podman, and breaks image inspection
commands. Adding 'localhost/' prefix prevents this behavior while keeping images
local and ensuring consistent naming across both container runtimes.

Changes:
- a2a/exgentic_agent/build.sh: Add localhost/ prefix to image names
- mcp/exgentic_benchmarks/build.sh: Add localhost/ prefix to image names

This ensures 'docker inspect' and 'podman inspect' work consistently with the
same image names across both tools.

Signed-off-by: Yoav Katz <katz@il.ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant