Docker-compose don't understand --env-file

CentOS 7
installed docker-ce docker-ce-cli docker-buildx-plugin docker-compose-plugin
running docker

docker-compose --env-file config.env up --build


# docker-compose --env-file config.env up --build
Define and run multi-container applications with Docker.

  docker-compose [-f <arg>...] [options] [COMMAND] [ARGS...]
  docker-compose -h|--help

  -f, --file FILE             Specify an alternate compose file
                              (default: docker-compose.yml)
  -p, --project-name NAME     Specify an alternate project name
                              (default: directory name)
  --verbose                   Show more output

Seems like a docker-compose don’t mind what a hell is ‘–env-file’ and showing help for usage.

Looks like you have a very old version of the docker-compose v1 client on your machine, that doesn’t support that argument.

If you want to use the docker-compose-plugin that was installed, you need to use docker compose (v2) instead of docker-compose (v1).

Thank you for advice.

# docker compose version
Docker Compose version v2.16.0

It appears that a V2 has been installed, but the behavior remains unchanged.

Please share the command and the resulting output, like you did in your first post. This time of course with docker compose instead of `docker-compose´.

I remember posts where people reported they had to downgrade the compose-plugin to 2.15 because something was not working for them, Though, I neither remember what exactly was not working, nor which platform exactly was affected.

I’ve just copied file config.env from directory config to upper current directory, rename him to .env and got rid off --env-file.
It’s work.