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

Issue with podman : --volumes-from #23643

Closed
nanditararvi opened this issue Aug 16, 2024 · 8 comments
Closed

Issue with podman : --volumes-from #23643

nanditararvi opened this issue Aug 16, 2024 · 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

@nanditararvi
Copy link

Issue Description

The podman ---volumes-from isnt mounting folders from exiting image created

Steps to reproduce the issue

Steps to reproduce the issue

  1. Create a image of any repo
  2. Try to mount this image using --volumes-from onto other conatiner
  3. See that files arent getting mounted

image

Describe the results you received

Files are missing when image volume is mounted onto the container

image

Describe the results you expected

At --volume-from mount; similar to docker; it should mount all files onto the container from image. Works properly in docker

podman info output

If you are unable to run podman info for any reason, please provide the podman version, operating system and its version and the architecture you are running.

Podman version:

version:
  APIVersion: 3.4.4
  Built: 0
  BuiltTime: Thu Jan  1 00:00:00 1970
  GitCommit: ""
  GoVersion: go1.18.1
  OsArch: linux/amd64
  Version: 3.4.4

Podman in a container

Yes

Privileged Or Rootless

Rootless

Upstream Latest Release

Yes

Additional environment details

Ubuntu 22.04 machine used

Additional information

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

@nanditararvi nanditararvi added the kind/bug Categorizes issue or PR as related to a bug. label Aug 16, 2024
@Luap99
Copy link
Member

Luap99 commented Aug 16, 2024

3.4. is ancient. We only supported the latest upstream release so please test with podman 5.2.
Second, please do not use screenshots of terminal text. Copy and paste the output please.

@Luap99 Luap99 closed this as not planned Won't fix, can't repro, duplicate, stale Aug 16, 2024
@nanditararvi
Copy link
Author

@Luap99
sudo apt-get update
sudo apt-get install -y podman:
For ubuntu by default 3.44 is installed using above commands, can you help me with how to install 5.2 for ubuntu 22.04?

@rhatdan
Copy link
Member

rhatdan commented Aug 16, 2024

You need to ask Ubuntu to update there version of Podman or switch to a distribution which is more up to date.

@Luap99
Copy link
Member

Luap99 commented Aug 16, 2024

see #17362, there are some third party repos listed that might work.

@nanditararvi
Copy link
Author

Okay, thanks

@nanditararvi
Copy link
Author

nanditararvi commented Aug 22, 2024

Hi @Luap99 : I am facing the same issue with podman version 5.2:

APIVersion: 5.2.0
Built: 1724222036
BuiltTime: Wed Aug 21 06:33:56 2024
GitCommit: ""
GoVersion: go1.23.0
Os: linux
OsArch: linux/amd64
Version: 5.2.0

"-volumes-from" -doesnt work; Can you please let me know if something is missing; The folders in image doesnt get mounted onto the container. The same works for docker.

podman create -v /test-repos --name testrepo localhost/testimage /bin/true

podman run -it --network slirp4netns --volumes-from testrepo docker.io/library/ubuntu:22.04 /bin/bash
root@dd3c4809b5ba:/# cd /test-repos/
root@dd3c4809b5ba:/test-repos# ls
root@dd3c4809b5ba:/test-repos#

podman run -it --network slirp4netns localhost/testimage:latest /bin/bash
root@90bb93fd90d1:/test-repos# ls
runtimeconfigs systems testcases testmatrices

@Luap99
Copy link
Member

Luap99 commented Aug 22, 2024

This works:

$ podman run --name c1 -v /test quay.io/libpod/testimage:20240123 touch /test/abc
$ podman run --volumes-from c1 quay.io/libpod/testimage:20240123 ls /test
abc

AFAICT copy up of volume content only happens on start time by default, you would need to set the prepare_volume_on_create option in containers.conf to achieve this behavior.
see #10262

@nanditararvi
Copy link
Author

Okay, thanks, this works!

@stale-locking-app stale-locking-app bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Nov 21, 2024
@stale-locking-app stale-locking-app bot locked as resolved and limited conversation to collaborators Nov 21, 2024
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

3 participants