Skip to content

fix: align Docker working directory with reth for relative path compatibility#28

Merged
rezzmah merged 4 commits into
mainfrom
fix/docker-working-directory
Jun 20, 2025
Merged

fix: align Docker working directory with reth for relative path compatibility#28
rezzmah merged 4 commits into
mainfrom
fix/docker-working-directory

Conversation

@rezzmah
Copy link
Copy Markdown
Contributor

@rezzmah rezzmah commented Jun 19, 2025

Summary

  • Fixes relative path resolution issue in Docker containers by aligning working directory with standard reth
  • Removes WORKDIR /app to match reth's Docker configuration where working directory defaults to /
  • Resolves issue where relative paths like .tmp/genesis.json would incorrectly resolve to /app/.tmp/genesis.json instead of /.tmp/genesis.json

Problem

The issue occurred because:

  1. bera-reth Docker image set WORKDIR /app
  2. Standard reth Docker image has no explicit working directory (defaults to /)
  3. When users mount volumes like -v $(pwd)/.tmp:/.tmp, the relative path .tmp/file.json resolves differently:
    • reth: .tmp/file.json/.tmp/file.json
    • bera-reth: .tmp/file.json/app/.tmp/file.json

Solution

Remove the WORKDIR /app line from Dockerfile to match reth's behavior exactly.

Test Plan

  • Verified standard reth works with relative paths in Docker
  • Confirmed bera-reth fails with same relative paths
  • Tested fix using -w / override successfully
  • Commit removes the problematic WORKDIR /app line

Closes #27

rezzmah added 4 commits June 19, 2025 10:45
- Update chainspec import to use alloy::evm instead of alloy_evm
- Add missing timestamp parameter to next_block_base_fee calls
- Remove unused dependencies: log, reth-node-api, reth-rpc, reth-trie-db
- Update Cargo.lock with cargo update to resolve version conflicts
…tibility

- Remove WORKDIR /app to match standard reth Docker configuration
- Fixes relative path resolution in containerized environments
- Resolves issue where .tmp/file.json would resolve to /app/.tmp/file.json instead of /.tmp/file.json

Closes #27
@rezzmah rezzmah merged commit ea73c5f into main Jun 20, 2025
10 checks passed
@rezzmah rezzmah deleted the fix/docker-working-directory branch June 20, 2025 07:39
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.

bug: --chain argument requires absolute paths, breaks relative path compatibility with standard reth

1 participant