-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Networks are added to the quadlet file with ".network" appended #48
Comments
For compose files, podlet assumes that networks listed for a service are also listed under the top-level Podlet will also generate a For example, to complete your snippet above, if you give podlet the following compose file: services:
test:
container_name: test
image: test/test:latest
networks:
- main
networks:
main: It will produce the output: # test.container
[Container]
ContainerName=test
Image=test/test:latest
Network=main.network
---
# main.network
[Network] Representing two quadlet files to be used together. As a side note, if your goal is to group all containers defined in a compose file into a separate network, this is better achieved with pods. All containers in a pod share a network namespace. First, remove or comment out the network definitions in the compose file. Then use |
Pods won't work in my use case, however, you have cleared up some confusion for me and the info will help out a lot. This was obviously my lack of knowledge, not an issue with the project. Thanks! Closing. |
I'm glad I was able to help. I just mentioned pods because they solve a pretty common use case and people coming from docker may not know about them. |
When creating a quadlet from a compose file containing one or more network definitions, it will output the resulting container structure with ".network" appended to the end of all networks configured. This is not the correct syntax and will fail.
Given the compose file below:
The output will be:
This issue does not occur if you provide podlet with podman run arguments insead of a compose file:
Given the command:
podlet --install podman run --network main test/test:latest
The output will be:
The text was updated successfully, but these errors were encountered: