Comments (8)
@apeteri ,
thank you for looking into the code. This is what I get from the user's perspective:
[az@dell5000 podman-compose]$ podman-compose -v
podman-compose version 1.1.0
podman version 4.9.4
[az@dell5000 podman-compose]$ podman-compose -h
usage: podman-compose [-h] [-v] [--in-pod in_pod] [--pod-args pod_args] [--env-file env_file] [-f file] [--profile profile] [-p PROJECT_NAME] ..........
<skip here>
options:
-h, --help show this help message and exit
-v, --version show version
--in-pod in_pod pod creation
--pod-args pod_args custom arguments to be passed to `podman pod`
<skip here>
the way I read it - "--in-pod" should be used for "pod creation". Especially is we look at the "--pod-args" . Looks like (not working ) an attempt to implement pod creation.
no further help seemed to be available for "--in-pod".
I may be wrong.
from podman-compose.
hmmm... That doesn't seem to be working either...
If I provide "name: pasta", compose creates a network named "pasta".
I reset the system and specified the default network mode ( is it mode ? or is it a driver? ) to pasta:
[sailtech@dell5000 ~]$ grep cmd ~/.config/containers/containers.conf
#default_rootless_network_cmd = "slirp4netns"
default_rootless_network_cmd = "pasta"
#network_cmd_path = ""
#network_cmd_options = []
[sailtech@dell5000 ~]$ podman info | grep networkBackend
networkBackend: netavark
networkBackendInfo:
[sailtech@dell5000 ~]$ podman run -d --name=myubi registry.access.redhat.com/ubi8/ubi
[sailtech@dell5000 ~]$ podman inspect --format {{.HostConfig.NetworkMode}} myubi
pasta
[sailtech@dell5000 ~]$ podman-compose --in-pod=yes -f ./podman-compose.yml up
....
[sailtech@dell5000 ~]$ podman inspect --format {{.HostConfig.NetworkMode}} sailtech_restapi_1
bridge
[sailtech@dell5000 ~]$ podman network ls
NETWORK ID NAME DRIVER
2f259bab93aa podman bridge
8f1d4e09447a sailtech_default bridge
[sailtech@dell5000 ~]$ podman network inspect sailtech_default
[
{
"name": "sailtech_default",
"id": "8f1d4e09447a973e4225ba5262e4405722c480c42dcf70da2934fae2e9c1a91b",
"driver": "bridge",
"network_interface": "podman2",
"created": "2024-06-18T23:07:06.718877522-04:00",
"subnets": [
{
"subnet": "10.89.1.0/24",
"gateway": "10.89.1.1"
}
],
"ipv6_enabled": false,
"internal": false,
"dns_enabled": true,
"labels": {
"com.docker.compose.project": "sailtech",
"io.podman.compose.project": "sailtech"
},
"ipam_options": {
"driver": "host-local"
}
}
]
it looks like the compose creates a bridge network ignoring the default setting to pasta ..
from podman-compose.
I've misunderstood the assignment 😄 My suggestion indeed should only change the network name, if anything.
Unfortunately I'm not very familiar with Podman's rootless network backends. Perhaps pasta
is not mapped to a property in the output of podman network inspect
.
from podman-compose.
I think that (the network part of the problem) will go into a new ticket. (filed #967 )
@apeteri - Thank you for working with me on this quite frustrating issue.
Issue summary:
- the documentation for --in-pod argument in podman-compose v 4.9.x is insufficient
- providing unexpected values to --in-pod does not result in errors or warning messages, which breaks the expected functionality ( e.g. containers do not run in the pod as user expects )
- the documentation for --pod-args is lacking clarity and examples.
from podman-compose.
--in-pod
requires a yes/no answer only, strange that the invocation is not rejected:
podman-compose/podman_compose.py
Lines 2008 to 2013 in 6d8d3e9
I've also found supporting evidence in the following comments:
from podman-compose.
I've been in your shoes because initially I thought --in-pod
expects a pod name without any additional modifiers!
The current reality is that when this value is set to true
, a pod will be created whose name matches the project with a "pod_" prefix – this is described in the last comment of #693 linked above and the code is located at:
podman-compose/podman_compose.py
Lines 348 to 359 in 6d8d3e9
You'll have to set the project name (either by renaming the directory the Compose file is sitting in or via the --project-name
argument) and the name of the pod will be adjusted accordingly.
from podman-compose.
@apeteri ,
thank you for digging the source for me! Specifying "yes" and the project name did work. Do you happen to know what is the mystical combination that should be used to specify a particular network mode? Say, I want to create a pod with pasta....
from podman-compose.
Compose's network configuration options might be sufficient for this: https://docs.docker.com/compose/networking/#configure-the-default-network
I have two options in mind:
networks:
default:
name: pasta
Alternatively if you specify a single network with a key, the default network no longer gets created but its name might be prefixed with the project name and an underscore, as with pods and containers:
networks:
pasta:
from podman-compose.
Related Issues (20)
- `network_mode: none` is ignored
- Error in podman-compose up command HOT 3
- Mismatch of Documentation and Implementation of UID/GID Mappings
- compose does not use pasta network
- Error setting up OTBR ''extra spaces found" HOT 1
- podman-compose rebuilds an image that is up-to-date, pressumably for the environment set in docker-compose.yml HOT 1
- Environment handling needs integration tests
- Secrets handling needs more unit tests HOT 2
- 'podman-compose build' builds replicate images for each service in docker-compose.yaml that share a common image.
- 1.1.0 (and perhaps above) broke the use of Containerfiles HOT 1
- Error: unknown flag: --env HOT 1
- podman-compose should throw a readable error on too old python HOT 2
- All integration tests should be run automatically HOT 1
- Environment should not be set in build context HOT 2
- Detect case when port forwarding is used together with uid/gid mapping on Podman 3.4.x and issue warning HOT 4
- podman-compose up -d <container> starts other containers in the compose file
- lint checks in CI don't currently work properly.
- Release version 1.2.0 to EPEL 8 / EPEL 9 HOT 1
- Integration tests should not use network connectivity if not necessary
- Incorrect implementation of `include` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from podman-compose.