Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unknown flag: --profile ? And my docker is latest? #165

Closed
lizekui opened this issue Oct 22, 2022 · 18 comments
Closed

unknown flag: --profile ? And my docker is latest? #165

lizekui opened this issue Oct 22, 2022 · 18 comments
Labels
awaiting-response Waiting for the issuer to respond

Comments

@lizekui
Copy link

lizekui commented Oct 22, 2022

My OS is Ubuntu 16.04, when I type docker compose --profile download up --build

returns:

unknown flag: --profile
See 'docker --help'.

Usage:  docker [OPTIONS] COMMAND

A self-sufficient runtime for containers

My software version is as follows:

$ docker --version
Docker version 20.10.7, build f0df350

$ docker-compose --version
docker-compose version 1.29.2, build 5becea4c
@AbdBarho
Copy link
Owner

docker compose not docker-compose

@AbdBarho AbdBarho added the awaiting-response Waiting for the issuer to respond label Oct 22, 2022
@lizekui
Copy link
Author

lizekui commented Oct 22, 2022

well dear @AbdBarho , i indeed copy the command use docker compose --profile but return unknown flag: --profile ...

What is the ridiculous problem with my docker?

@AbdBarho
Copy link
Owner

AbdBarho commented Oct 22, 2022

docker-compose is the old v1 which does not have the flag.

docker compose is v2 which has the flag

what is your docker compose version?

related #16 (comment)

@DevilaN
Copy link
Contributor

DevilaN commented Oct 23, 2022

Ubuntu Linux 16.04 LTS reached the end of its five-year LTS window on April 30th 2021 and is no longer supported by its vendor, Canonical except through a paid annual Extended Security Maintenance (ESM).
Your docker version (20.10.7) has been released on 2021-06-02 and almost for sure does not contain compose v2, because it has been release with 20.10.13 as a plugin to run alongside v1.
Docker compose v1 does not support --profile flag.

What is the ridiculous problem with my docker?

Without updating system to more recent one supporting proper docker version there is nothing anybody can do to help you any further.

@xiangcp
Copy link

xiangcp commented Oct 29, 2022

$ docker -v
Docker version 20.10.21, build baeda1f
$ docker compose version
Docker Compose version v2.2.3
$ docker compose --profile download up --build
(root) Additional property name is not allowed

Although my docker compose version is changed to v2, it still reports an error:(root) Additional property name is not allowed

@AbdBarho
Copy link
Owner

@xiangcp update to latest docker compose, mine is 2.10.2

@shinyone
Copy link

shinyone commented Oct 30, 2022

Had the same issue with unknown flag --profile

Solution from another issue, worked for me:

sudo apt install docker-compose-plugin

@lizekui
Copy link
Author

lizekui commented Oct 31, 2022

@shinyone your solution just save me! Thanks dear everyone~

@lizekui lizekui closed this as completed Oct 31, 2022
@spuliz
Copy link

spuliz commented Nov 19, 2022

When I run sudo apt install docker-compose-plugin I get "No package docker-compose-plugin available."

@shinyone
Copy link

what are your versions? You need V2

$ docker --version
$ docker-compose --version

@webdevbyjoss
Copy link

have the same issue on my setup, my versions are

# docker-compose --version
Docker Compose version v2.13.0

# docker --version
Docker version 20.10.21, build baeda1f

# docker compose up --profile
unknown flag: --profile

@AbdBarho
Copy link
Owner

AbdBarho commented Dec 9, 2022

@webdevbyjoss maybe it is a typo but:

docker-compose

and

docker compose

are two different things

also, --profile [x] up, not up --profile [x]

@webdevbyjoss
Copy link

thnx for the comment, in my case the reported version is still the same

# docker compose version
Docker Compose version v2.13.0

@webdevbyjoss
Copy link

webdevbyjoss commented Dec 9, 2022

also, --profile [x] up, not up --profile [x]

Yes!! That was it!

# docker compose --profile [profile X] up

Thank you. I hope this will be useful for others.

@JansenSmith
Copy link

Thank you @shinyone !

@alhabarneh
Copy link

@AbdBarho

also, --profile [x] up, not up --profile [x]

This saved me! Thanks!!

@hocop
Copy link

hocop commented Nov 26, 2023

For me sudo apt install docker-compose-plugin didn't work. What did work was:

sudo apt install docker-compose-v2

@C2jeremy
Copy link

C2jeremy commented Apr 1, 2024

For me sudo apt install docker-compose-plugin didn't work. What did work was:对我来说 sudo apt install docker-compose-plugin 没有用。起作用的是:

sudo apt install docker-compose-v2

This saves me ! Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-response Waiting for the issuer to respond
Projects
None yet
Development

No branches or pull requests