apache / camel-k

Apache Camel K is a lightweight integration platform, born on Kubernetes, with serverless superpowers
https://camel.apache.org/camel-k
Apache License 2.0
863 stars 344 forks source link

Make images does not work out of the box #5464

Closed lburgazzoli closed 4 months ago

lburgazzoli commented 5 months ago

What happened?

The make images does not work out of the box as it requires docker-buildx to be installed, but it is not mentioned in the developer/contribution guide. If you installdocker-buildx, them the build succeed.

Steps to reproduce

  1. checkout the project
  2. follow the instruction on https://camel.apache.org/camel-k/next/contributing/developers.html
  3. run make images
  4. it should fail with the provided logs

Relevant log output

####### Building Camel K operator arch amd64 container image...
mkdir -p build/_maven_output
docker buildx build --target base --platform=linux/amd64 --build-arg IMAGE_ARCH=amd64 --load -t docker.io/apache/camel-k:2.4.0-SNAPSHOT-amd64 -f build/Dockerfile .
unknown flag: --target
See 'docker --help'.

Usage:  docker [OPTIONS] COMMAND

A self-sufficient runtime for containers

Common Commands:
  run         Create and run a new container from an image
  exec        Execute a command in a running container
  ps          List containers
  build       Build an image from a Dockerfile
  pull        Download an image from a registry
  push        Upload an image to a registry
  images      List images
  login       Log in to a registry
  logout      Log out from a registry
  search      Search Docker Hub for images
  version     Show the Docker version information
  info        Display system-wide information

Management Commands:
  builder     Manage builds
  container   Manage containers
  context     Manage contexts
  image       Manage images
  manifest    Manage Docker image manifests and manifest lists
  network     Manage networks
  plugin      Manage plugins
  system      Manage Docker
  trust       Manage trust on Docker images
  volume      Manage volumes
...


### Camel K version

main
squakez commented 5 months ago

Yes, docker buildx is a prerequisite to build multi arch. We must add to the documentation.