Skip to content
This repository has been archived by the owner on Sep 28, 2024. It is now read-only.

unknown flag error #135

Closed
AugustasV opened this issue Aug 4, 2023 · 5 comments Β· Fixed by #137
Closed

unknown flag error #135

AugustasV opened this issue Aug 4, 2023 · 5 comments Β· Fixed by #137

Comments

@AugustasV
Copy link

πŸ› Bug description

Followed hocus quick start guide, but got that error than trying to run on my linux machine

namai@parrot ~/hocus (main)
$ HOCUS_HOSTNAME="localhost" ops/bin/local-up.sh
Pulling docker images πŸ“₯ - ❌ in 1.23
unknown flag: --ignore-buildable

Above you will find the logs
Please report this problem here
πŸ™πŸ™πŸ™  https://github.com/hocus-dev/hocus/issues/new/choose  πŸ™πŸ™πŸ™

Environment

  • Hocus version (commit hash) latest ca01333
  • Parrot OS 5.3 (Electro Ara) Kernel 6.1.0-1parrot1-amd64
  • Any other environment information that may help
@regner
Copy link

regner commented Aug 5, 2023

See this issue: #11

Running sudo apt install --only-upgrade docker-compose-plugin may fix your issue.

@regner
Copy link

regner commented Aug 5, 2023

It might be a good idea for the ops/bin/local-up.sh script to check the version of Docker compose, rather than just if it is installed.

https://github.com/hocus-dev/hocus/blob/main/ops/bin/local-up.sh#L76

@regner
Copy link

regner commented Aug 5, 2023

It appears that --ignore-buildable was added with v2.15.0, released Jan. 5th: https://github.com/docker/compose/releases/tag/v2.15.0

@regner
Copy link

regner commented Aug 5, 2023

A possible solution:

# Check minimum version of docker compose
# We require docker compose of at least version 2.15.0 which introduced --ignore-buildable
COMPOSE_VERSION="$(docker compose version | grep -o -E '[0-9]+(\.[0-9]+){2}$')"
COMPOSE_REQUIRED_VERSION="2.15.0"
if ! [ "$(printf '%s\n' "$COMPOSE_REQUIRED_VERSION" "$COMPOSE_VERSION" | sort -V | head -n1)" = "$COMPOSE_REQUIRED_VERSION" ]; then
  # Some better explination...
  echo "Less than ${COMPOSE_REQUIRED_VERSION}"
  exit 1
fi

@gorbak25
Copy link
Member

gorbak25 commented Aug 7, 2023

@regner Thank you for suggesting a fix! --ignore-buildable is only needed when building the containers locally. After #120 got merged that flag is not needed when pulling the agent/ui/setup images from quay. Will make a PR today which will remove the flag when using prebuild images, otherwise it will do a docker-compose version check.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants