containers / podman-compose

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

i have a compose file but not run exactly #651

Open hotsmile opened 1 year ago

hotsmile commented 1 year ago

Describe the bug A clear and concise description of what the bug is.

Please make sure it's not a bug in podman (in that case report it to podman) or your understanding of docker-compose or how rootless containers work (for example, it's normal for rootless container not to be able to listen for port less than 1024 like 80)

i have the compose file ,i use the centos8 ,with podman, podman-compose, but i can run it ,because the container each other access but i use the centos7.x use the docker and docker-compose ,it can run normal. why?

please try to reproduce the bug in latest devel branch

To Reproduce Steps to reproduce the behavior:

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

please use minimal reproducible example for example give me a small busybox-based compose yaml

Expected behavior A clear and concise description of what you expected to happen.

Actual behavior What is the behavior you actually got and that should not happen.

Output

$ podman-compose version
using podman version: 4.2.0
podman-compose version  1.0.3
podman --version 
podman version 3.4.0

$ my compose file is that 
...
version: '3'
services:
  sonic-server-eureka:
    image: "sonicorg/sonic-server-eureka:v2.4.1"
    hostname: sonic-server-eureka
    environment:
      - SONIC_EUREKA_USERNAME
      - SONIC_EUREKA_PASSWORD
      - SONIC_EUREKA_PORT
      - SONIC_EUREKA_HOST=sonic-server-eureka
    volumes:
      - ./logs/:/logs/
    networks:
      - sonic-network
    ports:
      - "${SONIC_EUREKA_PORT}:${SONIC_EUREKA_PORT}"
  sonic-server-gateway:
    image: "sonicorg/sonic-server-gateway:v2.4.1"
    hostname: sonic-server-gateway
    environment:
      - SONIC_EUREKA_USERNAME
      - SONIC_EUREKA_PASSWORD
      - SONIC_EUREKA_PORT
      - SONIC_EUREKA_HOST=sonic-server-eureka
      - SECRET_KEY
      - EXPIRE_DAY
    volumes:
      - ./logs/:/logs/
    depends_on:
      - sonic-server-eureka
    networks:
      - sonic-network
    restart: always
  sonic-server-controller:
    image: "sonicorg/sonic-server-controller:v2.4.1"
    environment:
      - SONIC_EUREKA_USERNAME
      - SONIC_EUREKA_PASSWORD
      - SONIC_EUREKA_PORT
      - SONIC_EUREKA_HOST=sonic-server-eureka
      - MYSQL_HOST
      - MYSQL_PORT
      - MYSQL_DATABASE
      - MYSQL_USERNAME
      - MYSQL_PASSWORD
      - SONIC_SERVER_HOST
      - SONIC_SERVER_PORT
      - SECRET_KEY
      - EXPIRE_DAY
      - REGISTER_ENABLE
      - NORMAL_USER_ENABLE
      - LDAP_USER_ENABLE
      - LDAP_USER_ID
      - LDAP_BASE_DN
      - LDAP_BASE
      - LDAP_USERNAME
      - LDAP_PASSWORD
      - LDAP_URL
      - LDAP_OBJECT_CLASS
    networks:
      - sonic-network
    volumes:
      - ./logs/:/logs/
    depends_on:
      - sonic-server-eureka
    restart: always
  sonic-server-folder:
    image: "sonicorg/sonic-server-folder:v2.4.1"
    environment:
      - SONIC_EUREKA_USERNAME
      - SONIC_EUREKA_PASSWORD
      - SONIC_EUREKA_HOST=sonic-server-eureka
      - SONIC_EUREKA_PORT
      - SONIC_SERVER_HOST
      - SONIC_SERVER_PORT
      - SECRET_KEY
      - EXPIRE_DAY
    networks:
      - sonic-network
    volumes:
      - ./keepFiles/:/keepFiles/
      - ./imageFiles/:/imageFiles/
      - ./recordFiles/:/recordFiles/

      - ./packageFiles/:/packageFiles/
      - ./logs/:/logs/
    depends_on:
      - sonic-server-eureka
    restart: always
  sonic-client-web:
    image: "sonicorg/sonic-client-web:v2.4.1"
    environment:
      - SONIC_SERVER_HOST
      - SONIC_SERVER_PORT
    networks:
      - sonic-network
    depends_on:
      - sonic-server-gateway
    restart: always
    ports:
      - "${SONIC_SERVER_PORT}:80"

networks:
  sonic-network:
    driver: bridge

Environment:

Additional context

Add any other context about the problem here. my compose file env file are packaged in below zip. please check it

sonic-server-v2.4.1.zip

bugfest commented 1 year ago

Hi @hotsmile!

There're a lot of missing environment variables in your docker-compose.yml. Please retry adding all those missing definitions or remove the unnecessary ones. Also try installing the podman-compose devel version. Check the installation section or... TLDR:

$ pip3 install https://github.com/containers/podman-compose/archive/devel.tar.gz