podlet icon indicating copy to clipboard operation
podlet copied to clipboard

Feature Request: add `(--pod/--kube) --name` parameter

Open sugoidogo opened this issue 1 year ago • 3 comments

A docker-compose file doesn't require a top-level name field, but when using a nameless file as input to podlet compose --pod, the following error message appears:

[root@digitalocean ztnet]# podlet compose --pod
Error:
   0: error converting compose file
   1: `name` is required when using `--pod`

Location:
   src/cli/compose.rs:130

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.

That error message doesn't specify that name is a field in the docker compose file, which I think should also be updated for clarity, but I would also prefer if I could simply provide the name of the pod on the command line so that I could use unmodified compose files as input

sugoidogo avatar Nov 22 '24 23:11 sugoidogo

+1, i spent a good amount of time wondering why podlet compose --pod compose.yml wasn't working, and why adding --name to the podlet command didn't help

Matthieu-LAURENT39 avatar Dec 06 '24 11:12 Matthieu-LAURENT39

Ah i see now, it's a top level property next to services

https://docs.docker.com/reference/compose-file/version-and-name/

paschun avatar Jan 27 '25 05:01 paschun

Same here. Thank you very much, @paschun !!!!!

flixman avatar Aug 23 '25 09:08 flixman