-
Notifications
You must be signed in to change notification settings - Fork 552
Add subpath support to volumes with type volume in --mount option
#1348
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
base: main
Are you sure you want to change the base?
Add subpath support to volumes with type volume in --mount option
#1348
Conversation
e4f7ada to
740aa00
Compare
p12tic
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but please check unit test failures.
20d75c3 to
e97a969
Compare
To allow subpath mount as describes in [Compose Specs](https://github.com/compose-spec/compose-spec/blob/main/05-services.md), Compose entries exemple: - type: volume source: webservices target: /srv/www/vhosts/server1 read_only: true volume: subpath: server1 - type: volume source: webservices target: /srv/www/vhosts/server2 read_only: true volume: subpath: server2 - type: volume source: webservices target: /srv/www/vhosts/server2/uploads read_only: false volume: subpath: server2/uploads Runs podman with options --mount type=volume,source=webservices,target=/srv/www/vhosts/server1,ro --mount type=volume,source=webservices,target=/srv/www/vhosts/server2,ro,subpath=server2 --mount type=volume,source=webservices,target=/srv/www/vhosts/server2/uploads,subpath=server2/uploads Signed-off-by: fccagou <[email protected]>
|
The test added is finally removed because get_mount_args calls assert_volume which fails running |
|
Tests can still be added for |
b302ecb to
0dd6e40
Compare
|
@p12tic, I just add the unittests and modify podman_compose.py to get it working. |
|
Hum, my commits messages have typo ... I change them ... |
0dd6e40 to
9b9c14f
Compare
podman_compose.py needs to be modified to allow the tests to run.
In the assert_volume function, an exception was raised because
compose.podman.output returns None, and the code then tries to call
decode("utf-8") on it.
This change removes the unnecessary call to decode.
Signed-off-by: fccagou <[email protected]>
To allow subpath mount as describes in Compose Specs, in complement of #1336
Compose entries exemple:
Runs podman with options
Contributor Checklist:
If this PR adds a new feature that improves compatibility with docker-compose, please add a link
to the exact part of compose spec that the PR touches.
For any user-visible change please add a release note to newsfragments directory, e.g.
newsfragments/my_feature.feature. See newsfragments/README.md for more details.
All changes require additional unit tests.