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

Podman -v or --volume flag isn't valid #19846

Closed
nicolasduminil opened this issue Sep 4, 2023 · 8 comments
Closed

Podman -v or --volume flag isn't valid #19846

nicolasduminil opened this issue Sep 4, 2023 · 8 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@nicolasduminil
Copy link

nicolasduminil commented Sep 4, 2023

Issue Description

The podman -v or --volume flags raise "Unknown flag" error

Steps to reproduce the issue

Steps to reproduce the issue

$ podman pod create -p 80:8080 --name mypod --volume ./html:/var/www/html:z

Describe the results you received

Error: unknown flag: --volume

Describe the results you expected

A new pod be created

podman info output

$ podman version
Version:      3.4.4
API Version:  3.4.4
Go Version:   go1.18.1
Built:        Thu Jan  1 01:00:00 1970
OS/Arch:      linux/amd64

Podman in a container

No

Privileged Or Rootless

Rootless

Upstream Latest Release

No

Additional environment details

Additional environment details

Additional information

Additional information like issue happens only occasionally or issue happens with a particular architecture or on a particular setting

@nicolasduminil nicolasduminil added the kind/bug Categorizes issue or PR as related to a bug. label Sep 4, 2023
@giuseppe
Copy link
Member

giuseppe commented Sep 4, 2023

--volume is not a valid flag for a pod.

You can specify it to podman create or podman run

@giuseppe giuseppe closed this as completed Sep 4, 2023
@giuseppe
Copy link
Member

giuseppe commented Sep 4, 2023

I've closed the issue but please feel free to comment further

@nicolasduminil
Copy link
Author

nicolasduminil commented Sep 4, 2023

@giuseppe What do you mean by --volume is not valid for a pod ? Do you mean that the following command isn't expected to work ?

$ podman pod create -p 8080:8080 --name mypod --volume ./html:/var/www/html:z

Have a look at Podman in Action by Daniel Walsh, Chapter 4.2, page 80. Now, if you want to close issues, be my guest but the most important is to fix them.

@vrothberg
Copy link
Member

Yes, podman create --volume exists but Podman v3.4.4 is too old. The flag was added by #11409 which made it into Podman 4.0.0.

@nicolasduminil
Copy link
Author

nicolasduminil commented Sep 4, 2023

@vrothberg I'm not talking about podman create ... --volume ... but about podman pod create ... --volume ... And what do you mean by "Podman 3.4.4 is too old" ? Too old for what ? To be able to run the mentioned command ? The documentation instructs to install podman by running apt-get install podman and, doing that, podman 3.4.4 gets installed.

@vrothberg
Copy link
Member

vrothberg commented Sep 4, 2023

@nicolasduminil, apologies, I wrote create --volume but meant pod create --volume. The latter was added by #11409 and is only available with Podman v4.0 and after.

The documentation instructs to install podman by running apt-get install podman and, doing that, podman 3.4.4 gets installed.

That seems like an issue in the Podman book. @rhatdan can you take a look? I guess the book requires Podman 4.0.

More recent versions of Ubuntu ship newer versions of Podman. Maybe that's an alternative.

@giuseppe
Copy link
Member

giuseppe commented Sep 4, 2023

Have a look at Podman in Action by Daniel Walsh, Chapter 4.2, page 80. Now, if you want to close issues, be my guest but the most important is to fix them.

sorry, my mistake as I've assumed --volume does not work with pod. As @vrothberg pointed out though, it requires a new version of Podman so there is nothing we can do upstream to address it, it must be fixed by the distro to provide an updated version.

@rhatdan
Copy link
Member

rhatdan commented Sep 5, 2023

Yes the book assumes podman 4.0 or later.

@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Dec 5, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

No branches or pull requests

4 participants