-
Notifications
You must be signed in to change notification settings - Fork 499
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
support for volumes #13
Comments
"just" volumes is already supported, but shared volumes needs some work. I'll see what I can do. |
im getting an error for services:
web:
# ...
volumes:
- "/var/www/storage"
|
understood, so the podman commands would be
|
the long syntax has 3 types:
there are more than one shorthand syntax for compose
those can be passed to podman using: (which is what currently used)
where options can be
or unified
|
thank you! those commits seem to have broken something: on commit fc61e01 (882cef7 seem to work fine)
My dockerfile: version: '3'
services:
web:
build: containers/web
ports:
- "8080:80"
volumes:
- ./dist:/var/www/html |
I've just pushed a29cf06 please test |
im getting this now
|
I've handled the case, please try now |
|
I've sorry for bothering you with me. I've pushed a fix. I'll create a compose file and test all the cases ASAP |
thx, that dockerfile from above is working now, but i haven't tested volumes as a whole ("external" volumes syntax). |
thank you. I'll keep this ticket open until I test all cases. |
Volumes currently works well. But the way podman-compose claims volumes might require some polish. It allocates the volume and uses |
how do you suggesting passing them to |
Although it's undocumented, it works the same way as Docker's named volumes. |
starting from which podman version they have this option? |
I've podman 1.2.0 and it shows
|
Sorry, my mistake. They don't have
|
I've reviewed the code and found that I'm already using
|
I don't know when exactly it is supported. And according to the discussion in containers/podman#3811 they fogot to add documentation when they add that functionality. I just know that podman 1.4.4 supports it. |
we need to know how to pass |
Since this issue seems to be tracking volumes support, I'll add this here. podman-compose/podman_compose.py Line 381 in b369073
In podman v1.6.0 the key is spelled "Mountpoint". This causes the following stacktrace:
|
I have the same problem.
If I comment out last lines like this:
then the error is no more ! |
but this is already handled here https://github.com/containers/podman-compose/blob/devel/podman_compose.py#L384 try:
src = json.loads(out)[0]["mountPoint"]
except KeyError:
src = json.loads(out)[0]["Mountpoint"] please use devel branch as in README. |
I installed devel branch and can use volumes now . Thank you very much ! |
yes, please don't use 0.1.5, use the latest devel branch instead
|
Not trying to be pushy or anything like that, but wouldn't be better to make a release with all the changes you folks have made since |
For my needs, the new volumes support working great. I tested named volumes, bind mounts (short syntax) with relative and absolute paths. |
Hello, we have the same issue ("mountPoint" vs "Mountpoint") with pip3-installed podman-compose (not devel). Can we please get this fix merged and released ? |
Still no release ? if you don't want it, atleast just made tagged release for devel branch so some linux distro can pinpoint to it |
Hi. Same issue here :(
|
There is not much point in using podman-compose anymore, while Podman supports Docker-Compose. You can use Docker Compose with Podman backend now. |
How so? Could you link to us to an article about that? |
Emilien I have an article on Fedora Magazine on how to do that:.
Use Docker Compose with Podman to Orchestrate Containers on Fedora Linux - Fedora Magazine
https://fedoramagazine.org/use-docker-compose-with-podman-to-orchestrate-containers-on-fedora
I'm sorry, it was the wrong article link. I corrected it.
|
I've tried to make it work on Mac but with no lack. :( |
Same here. Does anyone know if there is a way to expose the podman backend from inside the VM to the host MacOS system? |
I didn't know we had full support. Ideally I should just move to K8s yaml as my last foray into Ansible wasn't a lot neater. I am experienceing a bit of trouble with a sort-of hack I used in docker to get bind-mounted named volumes:
Not sure if it belongs here, or a separate issue (or if it could be in Podman itself - would need to work out the correct equivalent chain of CLI commands first). It took quite some time to find out how to do this in Docker, as everything was either named volume or bind-mount, not both as I wanted, to share between containers but back with ZFS. Is this still worth following up on reporting this, or is development on podman-compose likely to draw to a close if docker-compose can be used instead? Struggling to find much time for GH outside of work these days, but I have a couple more things I've found in podman-compose, and I try to report a least, otherwise nothing can ever be fixed. |
I'll close this, because latest version of podman-compose solved it. we have an issue reported for macos, I don't have a mac, I'm using fedora. so I can't help with that. |
Hello everybody I'm using macOS and this issue happened to me. Return:
Versions:
Does someone have the solution? Regards, |
I was told that there is a bug in on MacOS when passing I don't have mac. |
Hello @burredis, |
Hey alex198710, Regards |
Thanks @burredis, |
Hi there, I using MacOS version Monterey. The volumes tag in compose file does not work at all.
|
please try podman v4 on mac |
@toanvo288 I'm stuck on the same problem. I found this article that mounts a host dir to the qemu vm using ssh reverse proxy combined with [core@localhost ~]$ sshfs -p 10000 matheus@127.0.0.1:/Users /mnt/Users
connect_to 127.0.0.1 port 22: failed.
read: Connection reset by peer |
@muayyad-alsadi unfortunately Podman v4 is not available on brew yet. Homebrew/homebrew-core#95318 (comment) |
@matheussouza9 *Note: Don't use 127.0.0.1, You can use your host LAN ip address |
sshfs your-username@your-current-local-ip:absolute-path-to-your-local-project-folder your-podman-mounted-forder -o allow_other,uid=1000,gid=1000` |
@viinhpham and @matheussouza9 : thanks all. I'll check and verify it again. Hope it works with Podman version 4 without a workaround. |
it doesn't |
not sure if this happens for windows too, but for mac podman machine starts in a detached state, so it won't be able to access anything from your storage. You need to attach the $HOME to it in order to be able to access volumes
code stolen from https://stackoverflow.com/questions/69298356/how-to-mount-a-volume-from-a-local-machine-on-podman |
https://docs.docker.com/compose/compose-file/#volumes
The text was updated successfully, but these errors were encountered: