Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Unused keys in container shema #5569

Closed
docjyJ opened this issue Nov 10, 2024 · 9 comments
Closed

Unused keys in container shema #5569

docjyJ opened this issue Nov 10, 2024 · 9 comments
Labels
0. Needs triage Pending approval or rejection. This issue is pending approval.

Comments

@docjyJ
Copy link
Collaborator

docjyJ commented Nov 10, 2024

Steps to reproduce

  1. In file, https://github.com/nextcloud/all-in-one/blob/main/php/containers-schema.json: ctrl+f > cap_drop, profiles, user, networks or expose
  2. In file, https://github.com/nextcloud/all-in-one/blob/main/php/src/ContainerDefinitionFetcher.php: ctrl+f > cap_drop, profiles, user, networks or expose
  3. They are defined but never used...

"cap_drop": [
"NET_RAW"
]

Expected behavior

Actual behavior

Other information

Host OS

Output of sudo docker info

Docker run command or docker-compose file that you used

Other valuable info

(I'm rewriting mastercontainer in rust (to learn rust) and I found this...)

@docjyJ docjyJ added the 0. Needs triage Pending approval or rejection. This issue is pending approval. label Nov 10, 2024
@docjyJ docjyJ changed the title Unused cap_drop expose in container shema Unused keys in container shema Nov 10, 2024
@docjyJ
Copy link
Collaborator Author

docjyJ commented Nov 10, 2024

Maybe this behavior is intended for yaml, but it's confusing.

@szaimen
Copy link
Collaborator

szaimen commented Nov 10, 2024

Yes, it is intended because we generate https://github.com/nextcloud/all-in-one/blob/main/manual-install/latest.yml and https://github.com/nextcloud/all-in-one/tree/main/nextcloud-aio-helm-chart out of it. Do you have a better idea how to do that?

@docjyJ
Copy link
Collaborator Author

docjyJ commented Nov 10, 2024

Why have a cap_drop in YAML, but not with the mastercontainer ?

@szaimen
Copy link
Collaborator

szaimen commented Nov 10, 2024

Because cap_drop is by default applied for all containers:

$requestBody['HostConfig']['CapDrop'] = ['NET_RAW'];

@szaimen
Copy link
Collaborator

szaimen commented Nov 10, 2024

Or WDYM?

@szaimen
Copy link
Collaborator

szaimen commented Nov 11, 2024

Linking to #3377 which was introduced first. Later #4116 was created.

@szaimen
Copy link
Collaborator

szaimen commented Nov 11, 2024

cap_drop, profiles, user, networks or expose

Actually, all of them are only there for the docker-compose yaml and the helm chart because they are generated out of the containers.json. In the mastercontainer itself is a separate logic to handle these, thus they are not actually needed for the mastercontainer.

How should we proceed with this issue?

@docjyJ
Copy link
Collaborator Author

docjyJ commented Nov 11, 2024

Move this to discussions as ideas?

@szaimen
Copy link
Collaborator

szaimen commented Nov 11, 2024

Move this to discussions as ideas?

Sounds good 👍

@nextcloud nextcloud locked and limited conversation to collaborators Nov 11, 2024
@szaimen szaimen converted this issue into discussion #5574 Nov 11, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
0. Needs triage Pending approval or rejection. This issue is pending approval.
Projects
None yet
Development

No branches or pull requests

2 participants