containers / podman-compose

a script to run docker-compose.yml using podman
GNU General Public License v2.0
5.01k stars 477 forks source link

Error Validating CNI Config #845

Open agieocean opened 7 months ago

agieocean commented 7 months ago

Describe the bug When running podman-compose build I receive the following error:

Error validating CNI config file /etc/cni/net.d/[containername]_default.conflist: [plugin bridge does not support config version "1.0.0" plugin portmap does not support config version "1.0.0" plugin firewall does not support config version "1.0.0" plugin tuning does not support config version "1.0.0"]

To Reproduce Steps to reproduce the behavior:

  1. what is the content of the current working directory (ex. docker-compose.yml, .env, Dockerfile, ...etc.)

docker-compose.yml

version: '3'
services:
  carch-api:
    build: .
    ports: "8888:8888"
    volumes:
      - ./downloads:/workspace/downloads
    command: python -u run.py
  carch-proxy:
    image: docker.io/abhinavsingh/proxy.py:latest
    ports: "8899:8899"

dockerfile

FROM docker.io/python:3
RUN apt update
RUN apt install -y ffmpeg gifsicle
RUN mkdir /workspace
RUN mkdir /workspace/downloads
ADD requirements.txt /workspace/
WORKDIR /workspace
RUN pip3 install -r requirements.txt
RUN pip3 install --upgrade sentry-sdk
RUN pip3 install --upgrade sphinx
ADD run.py /workspace
ADD .conf.json /workspace
  1. what is the sequence of commands you typed
mkdir downloads
podman-compose build
podman-compose up

Expected behavior The containers run and bind to ports 8888 and 8899

Actual behavior Receive the mentioned error message and the container dont run

Output


$ podman-compose version
podman-compose version: 1.0.6
['podman', '--version', '']
using podman version: 3.4.4
podman-compose version 1.0.6
podman --version
podman version 3.4.4

**Environment:**
 - OS: Linux / WSL / Mac
 - podman version: 3.4.4
 - podman compose version: 1.0.6
prestonhashworth commented 4 months ago

There's some bugs at play here as you have labeled: https://bugs.launchpad.net/ubuntu/+source/libpod/+bug/2024394

The work-around I have found is specifying the CNI version (key name is "cniVersion") in the /home/$USER/.config/cni/net.d/$COMPOSENAME.conflist to be 0.4.0

{
   "args": {
      "podman_labels": {
         "com.docker.compose.project": "gitea",
         "io.podman.compose.project": "gitea"
      }
   },
   "cniVersion": "0.4.0",
   "name": "gitea_gitea",
   "plugins": [
      {
      .
      .
      .