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

Add ability to pass options to container creation #719

Open
distefam opened this issue Aug 16, 2023 · 2 comments
Open

Add ability to pass options to container creation #719

distefam opened this issue Aug 16, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@distefam
Copy link

There is a way to pass arguments to the command that is run in the container, however, I cannot find a way to pass options to the build command itself. Specifically, I would like to pass --env-file to podman-create.

@distefam distefam added the enhancement New feature or request label Aug 16, 2023
@bellegarde-c
Copy link

Same here, I need --privileged otherwise, containers do not run.

@marhkb
Copy link
Owner

marhkb commented Dec 5, 2023

In general it's rather difficult to pass arbitrary option strings into the endpoint. It either needs changes in the underlying library podman-api rs libary (options builder would need some kind of hash map with string keys and probably json values) or in Pods I'd have to split the option string and let every part go through an if else with well known options and set the correct option on the builder.

So, for now I suggest we'd just add those options in the UI.

@distefam I'm not even sure if specifying an env file is part of the Podman RESTful API. I'm not sure because their API doc frontend seems very broken in general (https://docs.podman.io/en/latest/_static/api.html#tag/containers/operation/ContainerCreateLibpod doesn't show a request body at all). Specifying an env fle also not part in podman-api rs library and also not part of the docker documentation (https://docs.docker.com/engine/api/v1.43/#tag/Container/operation/ContainerCreate). But nevertheless, we can make this a feature of Pods if you'd like create a new issue for that.

@bellegarde-c We can also expose that if you'd like to create a new issue.

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

No branches or pull requests

3 participants