Skip to content

Conversation

@verils
Copy link

@verils verils commented Nov 26, 2025

I fixed an issue that occurred in v1.5.0.

When I built the AutoGPT project using podman-compose, I encountered the following problem:

bob@krusty-krab:~/Projects/git/AutoGPT/autogpt_platform$ podman compose --verbose build 
>>>> Executing external compose provider "/usr/bin/podman-compose". Please see podman-compose(1) for how to disable this message. <<<<

INFO:podman_compose:['podman', '--version', '']
INFO:podman_compose:using podman version: 5.7.0
INFO:podman_compose:podman build -f ../../autogpt_platform/backend/Dockerfile -t autogpt_platform_migrate --target migrate ../
INFO:podman_compose:podman build -f ../../autogpt_platform/backend/Dockerfile -t autogpt_platform_database_manager --target server ../
INFO:podman_compose:podman build -f ../../autogpt_platform/frontend/Dockerfile -t autogpt_platform_frontend --target prod --build-arg NEXT_PUBLIC_PW_TEST=false ../
INFO:podman_compose:podman build -f ../../autogpt_platform/backend/Dockerfile -t autogpt_platform_rest_server --target server ../
INFO:podman_compose:podman build -f ../../autogpt_platform/backend/Dockerfile -t autogpt_platform_websocket_server --target server ../
INFO:podman_compose:podman build -f ../../autogpt_platform/backend/Dockerfile -t autogpt_platform_notification_server --target server ../
INFO:podman_compose:podman build -f ../../autogpt_platform/backend/Dockerfile -t autogpt_platform_executor --target server ../
INFO:podman_compose:podman build -f ../../autogpt_platform/backend/Dockerfile -t autogpt_platform_scheduler_server --target server ../
Error: the specified Containerfile or Dockerfile does not exist, ../../autogpt_platform/backend/Dockerfile: no such file or directory
INFO:podman_compose:exit code: 125
Error: the specified Containerfile or Dockerfile does not exist, ../../autogpt_platform/backend/Dockerfile: no such file or directory
INFO:podman_compose:exit code: 125
Error: the specified Containerfile or Dockerfile does not exist, ../../autogpt_platform/backend/Dockerfile: no such file or directory
INFO:podman_compose:exit code: 125
Error: the specified Containerfile or Dockerfile does not exist, ../../autogpt_platform/backend/Dockerfile: no such file or directory
INFO:podman_compose:exit code: 125
Error: the specified Containerfile or Dockerfile does not exist, ../../autogpt_platform/backend/Dockerfile: no such file or directory
INFO:podman_compose:exit code: 125
Error: the specified Containerfile or Dockerfile does not exist, ../../autogpt_platform/backend/Dockerfile: no such file or directory
INFO:podman_compose:exit code: 125
Error: the specified Containerfile or Dockerfile does not exist, ../../autogpt_platform/backend/Dockerfile: no such file or directory
INFO:podman_compose:exit code: 125
Error: the specified Containerfile or Dockerfile does not exist, ../../autogpt_platform/frontend/Dockerfile: no such file or directory
INFO:podman_compose:exit code: 125
Error: executing /usr/bin/podman-compose --verbose build: exit status 125

Here's a fragment of the docker-compose.yml file in AutoGPT/autogpt_platform/:

services:
  migrate:
    build:
      context: ../
      dockerfile: autogpt_platform/backend/Dockerfile

I wrote some tests for container_to_build_args() function in podman_compose.py and found that it always concatenated the context path twice as the prefix of dockerfile path. For example, when I used context: subdir/, container_to_build_args() would generate build args like ... -f subdir/subdir/<dockerfile> ...

There are two different logical dockerfile paths when handling the -f, --file build argument with a local context (i.e., when the build context comes from the local filesystem):

  1. when checking if the dockerfile exists: the file path should be relative to the cwd where the podman-compose command is run.
  2. when using the -f build arg: the file path should be relative to the context root.

I fixed this issue and also added test cases to cover these scenarios.

@verils verils force-pushed the fix-context-path-handling branch from 3a11bb1 to 43d5de2 Compare November 26, 2025 11:41
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