Build the Doris image

The Doris Operator uses special cross-architecture Doris images which are not compatible with the apache/doris image on Docker Hub.

Environment

  • Docker version 19.03+
  • Enable Docker buildx plugin

Steps

  1. Clone the Doris repository and enter the images directory:

    git clone https://github.com/linsoss/doris-operator
    cd doris-operator/images
    
  2. Download the Doris binary package to the dockerfiles/resource directory, including x64 and arm versions, and unzip it with the following names:

    images
     ├── ...
     ├── resource
          ├── apache-doris-bin-arm64
          |     └── ...
          └── apache-doris-bin-amd64
                └── ...
    
  3. Create a cross-platform docker builder for amd64 and arm64:

    docker buildx create --name doris-builder --use --platform linux/amd64,linux/arm64
    
  4. Build cross-architecture Docker images and push them to the registry

    docker buildx build --platform linux/amd64,linux/arm64 -f fe/Dockerfile -t <register>/<namespace>/doris-fe:<tag> . --push
    docker buildx build --platform linux/amd64,linux/arm64 -f be/Dockerfile -t <register>/<namespace>/doris-be:<tag> . --push
    docker buildx build --platform linux/amd64,linux/arm64 -f cn/Dockerfile -t <register>/<namespace>/doris-cn:<tag> . --push
    docker buildx build --platform linux/amd64,linux/arm64 -f broker/Dockerfile -t <register>/<namespace>/doris-broker:<tag> . --push