Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DevPod calling podman-compose with invalid argument "ls" #1665

Open
rustacian0 opened this issue Feb 23, 2025 · 1 comment
Open

DevPod calling podman-compose with invalid argument "ls" #1665

rustacian0 opened this issue Feb 23, 2025 · 1 comment
Labels

Comments

@rustacian0
Copy link

What happened?
DevPod is failing to start my development container due to an error with podman-compose. The error message indicates that DevPod is passing ls as an argument to podman-compose, which is an invalid command. The full error message is:

error Error finding project files: >>>> Executing external compose provider "/Users/ods/homebrew/bin/podman-compose". Please see podman-compose(1) for how to disable this message. <<<<

usage: podman-compose ...
podman-compose: error: argument command: invalid choice: 'ls' (choose from help, version, wait, systemd, pull, push, build, up, down, ps, run, exec, start, stop, restart, logs, config, port, pause, unpause, kill, stats, images} ...

What did you expect to happen instead?

I expected DevPod to successfully start my development container using podman-compose without any errors.

How can we reproduce the bug? (as minimally and precisely as possible)

  1. Create a .devcontainer directory with a docker-compose.yml file (example below) and a devcontainer.json file (example below).
  2. Run devpod up in the directory containing the .devcontainer directory.

My docker-compose.yml:

version: "1"
services:
  chart-dev: 
    build: .
    container_name: chart-container
    volumes:
      - .:/app
    working_dir: /app
    restart: unless-stopped

My devcontainer.json:

{
    "name": "My Dev Container",
    "dockerComposeFile": "docker-compose.yml",
    "service": "my-service",
    "workspaceFolder": "/app"
}

Local Environment:

  • DevPod Version: [Run devpod version and paste the output here] (e.g., DevPod version v0.X.X)
  • Operating System: mac
  • ARCH of the OS: ARM64

DevPod Provider:

  • Cloud Provider: N/A
  • Kubernetes Provider: N/A
  • Local/remote provider: docker (using Podman Desktop)
  • Custom provider: N/A

Anything else we need to know?

I am using Podman Desktop. The podman-compose binary exists at /Users/ods/homebrew/bin/podman-compose. The issue seems to be that DevPod is incorrectly passing ls as an argument to podman-compose. The docker-compose.yml file is being loaded correctly (as per the logs), but the subsequent call to podman-compose fails.

log

[09:15:42] info time="2025-02-23T09:15:42+09:00" level=warning msg="/Users/ods/Documents/chart-container/.devcontainer/docker-compose.yml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion"
[09:15:42] debug Loaded project defaultchf101c
[09:15:43] error Error finding project files: >>>> Executing external compose provider "/Users/ods/homebrew/bin/podman-compose". Please see podman-compose(1) for how to disable this message. <<<<

usage: podman-compose [-h] [-v] [--in-pod in_pod] [--pod-args pod_args]
                      [--env-file env_file] [-f file] [--profile profile]
                      [-p PROJECT_NAME] [--podman-path PODMAN_PATH]
                      [--podman-args args] [--podman-pull-args args]
                      [--podman-push-args args] [--podman-build-args args]
                      [--podman-inspect-args args] [--podman-run-args args]
                      [--podman-start-args args] [--podman-stop-args args]
                      [--podman-rm-args args] [--podman-volume-args args]
                      [--no-ansi] [--no-cleanup] [--dry-run]
                      [--parallel PARALLEL] [--verbose]
                      {help,version,wait,systemd,pull,push,build,up,down,ps,run,exec,start,stop,restart,logs,config,port,pause,unpause,kill,stats,images} ...
podman-compose: error: argument command: invalid choice: 'ls' (choose from help, version, wait, systemd, pull, push, build, up, down, ps, run, exec, start, stop, restart, logs, config, port, pause, unpause, kill, stats, images)
Error: executing /Users/ods/homebrew/bin/podman-compose --project-name defaultchf101c ls -a --filter name=defaultchf101c --format json: exit status 2
: exit status 2
@jedthe3rd
Copy link

Try removing the attribute version from your compose file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants