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

Allow overriding of docker volume argument #1669

Closed
Kenchir opened this issue Nov 20, 2023 · 7 comments · Fixed by #1672
Closed

Allow overriding of docker volume argument #1669

Kenchir opened this issue Nov 20, 2023 · 7 comments · Fixed by #1672

Comments

@Kenchir
Copy link

Kenchir commented Nov 20, 2023

Description

The current ci_buildwheel runs a docker container with / mounted to '/host'. volume This can perhaps be made dynamic so that it can be overridden when passed as argument.

Build log

No response

CI config

No response

@joerick
Copy link
Contributor

joerick commented Nov 20, 2023

Hi. We're unlikely to add a feature without understanding the problem. Can I ask why you'd like that?

@Kenchir
Copy link
Author

Kenchir commented Nov 20, 2023

Hi @joerick , I have edited my issue. So problem happens when the root volume is restricted on the case of bitbucket My idea is to pass the volume argument which will override the default.

@joerick
Copy link
Contributor

joerick commented Nov 20, 2023

Does it error out currently with the use of --mount? Or just fail silently?

@Kenchir
Copy link
Author

Kenchir commented Nov 20, 2023

From the. Bitbucket docs, --mount is not allowed leaving --volume as the only option. Below is the error.

Starting container image kenchir/manylinux_x86_64...
info: This container will host the build for cp39-manylinux_x86_64, cp311-manylinux_x86_64...
Error response from daemon: authorization denied by plugin pipelines: -v only supports $BITBUCKET_CLONE_DIR and its subdirectories
                                                                       ✕ 0.03s
Error: Command ['docker', 'create', '--env=CIBUILDWHEEL', '--env=SOURCE_DATE_EPOCH', '--name=cibuildwheel-e6aedf54-1315-4495-9423-484147dc9662', '--interactive', '--volume=/:/host', '--cpus=3.5', '-m=10G', '--volume=/opt/atlassian/pipelines/agent/build/python-dtone-cdrparser:/host', 'kenchir/manylinux_x86_64', '/bin/bash'] failed with code 1. None

As you can see, it tries to / is disabled for security purpose.

@joerick
Copy link
Contributor

joerick commented Nov 21, 2023

I can imagine other reasons why users might want to disable that (isolation), and luckily this was quite easy to add, so I've pushed a PR.

@Kenchir
Copy link
Author

Kenchir commented Nov 28, 2023

Awesome!

@Kenchir Kenchir closed this as completed Nov 28, 2023
@joerick
Copy link
Contributor

joerick commented Jan 26, 2024

sorry for the delay, i rather forgot about this! Just released as v2.16.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants