podman-compose icon indicating copy to clipboard operation
podman-compose copied to clipboard

podman-compose [-f docker-compose.yml] config

Open loynoir opened this issue 3 years ago • 1 comments

Is your feature request related to a problem? Please describe.

Story

Related to https://github.com/containers/podman/issues/15001

That issue is using devcontainer generated from vscode, using Dockerfile format.

Reproduce

When using devcontainer generated from vscode, using docker-compose format,

and have settings.json

"remote.containers.dockerComposePath": "podman-compose"

Actual

Start: Run: podman-compose -f /path/to/.devcontainer/docker-compose.yml config
podman-compose: error: argument command: invalid choice: 'config' 
(choose from 'help', 'version', 'pull', 'push', 'build', 'up', 'down', 
'ps', 'run', 'exec', 'start', 'stop', 'restart', 'logs')

Expected

$ docker-compose -f .devcontainer/docker-compose.yml config
(config printed)

Describe the solution you'd like podman-compose [-f docker-compose.yml] config

Describe alternatives you've considered

Additional context

loynoir avatar Jul 24 '22 13:07 loynoir

Please update your version to latest devel vranch

See readme for details

muayyad-alsadi avatar Jul 24 '22 18:07 muayyad-alsadi

Just commenting I am getting the same error and I just installed this.

['podman', '--version', '']
using podman version: 4.3.1
podman-composer version  1.0.3
podman --version
podman version 4.3.1

This is my syntax from within a makefile

.SILENT: docker-compose.yml
docker-compose.yml: $(SERVICES:%=build/docker-compose/docker-compose.%.yml) .env
	docker-compose $(SERVICES:%=-f build/docker-compose/docker-compose.%.yml) config > docker-compose.yml

In a nutshell, my script is compiling multiple docker-compose files into a single docker-compose.yml file. Docker-compose v2 doesn't have any issue with this but podman-compose seems to fail at this point.

DonRichards avatar Dec 01 '22 21:12 DonRichards

The error message comes out as

/Library/Developer/CommandLineTools/usr/bin/make -B docker-compose.yml ENVIRONMENT=local
usage: docker-compose [-h] [-v] [-f file] [-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]
                      {help,version,pull,push,build,up,down,ps,run,exec,start,stop,restart,logs}
                      ...
docker-compose: error: argument command: invalid choice: 'config' (choose from 'help', 'version', 'pull', 'push', 'build', 'up', 'down', 'ps', 'run', 'exec', 'start', 'stop', 'restart', 'logs')

DonRichards avatar Dec 02 '22 19:12 DonRichards

Is there a podman-compose alternative to the 'config' target? Maybe an option to print out the yaml file with the expanded variable values.

jloropez avatar Feb 10 '23 03:02 jloropez