wowu / docker-rollout

🚀 Zero Downtime Deployment for Docker Compose
https://github.com/Wowu/docker-rollout
MIT License
2.37k stars 66 forks source link

unknown flag: --quiet error #29

Closed kerimembel closed 6 months ago

kerimembel commented 6 months ago

I have a docker-compose file like below.

version: "3.8"

services:

  traefik:
    image: traefik:v2.11
    container_name: traefik
    command:
      - "--api.insecure=true"
      - "--api.dashboard=false"
      - "--providers.docker=true"
    ports:
      - "$TRAEFIK_DOCKER_PORT:$TRAEFIK_LOCAL_PORT"
    volumes:
      - "/var/run/docker.sock:/var/run/docker.sock:ro"

  node:
    build: ./src
    restart: unless-stopped
    depends_on:
      - traefik
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.node.rule=Host(`localhost`) || Host(`0.0.0.0`)"
      - "traefik.http.services.node.loadbalancer.server.port=$NODE_DOCKER_PORT"
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:$NODE_DOCKER_PORT/health_checks/health"]
      interval: 30s
      timeout: 10s
      retries: 3
    stdin_open: true
    tty: true

I have installed docker-rollout on my local, and it is working fine. When I make docker rollout node after running my dompose file above, it works as expected. My local docker version is as follows.

src git:(main) docker --version
Docker version 20.10.14, build a224086

I installed it on my Ubuntu server with the same steps. However, when I run the docker rollout node command on my server, I get the following output and it does not work.

github@vmi1556310:~/Projects/e-ihracat-yolu-backend$ docker rollout node
unknown flag: --quiet
See 'docker --help'.

Usage:  docker [OPTIONS] COMMAND

docker-compose is a Docker CLI plugin

Management Commands:
  compose                    Docker Compose

Global Options:
      --config string      Location of client config files (default "/home/github/.docker")
  -c, --context string     Name of the context to use to connect to the daemon (overrides DOCKER_HOST env
                           var and default context set with "docker context use")
  -D, --debug              Enable debug mode
  -H, --host list          Daemon socket to connect to
  -l, --log-level string   Set the logging level ("debug", "info", "warn", "error", "fatal") (default "info")
      --tls                Use TLS; implied by --tlsverify
      --tlscacert string   Trust certs signed only by this CA (default "/home/github/.docker/ca.pem")
      --tlscert string     Path to TLS certificate file (default "/home/github/.docker/cert.pem")
      --tlskey string      Path to TLS key file (default "/home/github/.docker/key.pem")
      --tlsverify          Use TLS and verify the remote

Run 'docker COMMAND --help' for more information on a command.

For more help on how to use Docker, head to https://docs.docker.com/go/guides/

==> Service 'node' is not running. Starting the service.
unknown flag: --detach
See 'docker --help'.

Usage:  docker [OPTIONS] COMMAND

docker-compose is a Docker CLI plugin

Management Commands:
  compose                    Docker Compose

Global Options:
      --config string      Location of client config files (default "/home/github/.docker")
  -c, --context string     Name of the context to use to connect to the daemon (overrides DOCKER_HOST env
                           var and default context set with "docker context use")
  -D, --debug              Enable debug mode
  -H, --host list          Daemon socket to connect to
  -l, --log-level string   Set the logging level ("debug", "info", "warn", "error", "fatal") (default "info")
      --tls                Use TLS; implied by --tlsverify
      --tlscacert string   Trust certs signed only by this CA (default "/home/github/.docker/ca.pem")
      --tlscert string     Path to TLS certificate file (default "/home/github/.docker/cert.pem")
      --tlskey string      Path to TLS key file (default "/home/github/.docker/key.pem")
      --tlsverify          Use TLS and verify the remote

Run 'docker COMMAND --help' for more information on a command.

For more help on how to use Docker, head to https://docs.docker.com/go/guides/

Docker version on my ubuntu server is as follows.

github@vmi1556310:~$ docker --version
Docker version 24.0.5, build 24.0.5-0ubuntu1~20.04.1

Is this a problem about docker versions? What am I doing wrong and how can I solve the problem?

Thank you very much in advance.

kerimembel commented 6 months ago

I solved the problem, faster than I expected lol. I thought it was the service name and tried different names, but after some research I realized it was related to docker-compose.

Running the command below and installing docker-compose-v2 solved the problem.

sudo apt install docker-compose-v2

Thank you for this beautiful tool.