AppFlowy-Cloud/doc/LOCAL_BUILD.md
Nathan.fooo 82bcb5e879
feat: Deployment update (#169)
* docs: add ubuntu setup guide

* feat: add docker ci

* feat: create admin frontend image

* feat: trigger push docker ci

* ci: multiple arch

* fix: build

* chore: update ci

* chore: update ci

* fix: build

* fix: build

* fix: test

* fix: database access

* fix: test

* fix: test

* chore: update

* chore: update
2023-11-16 00:29:18 +08:00

1 KiB

To build a multi-architecture Docker image

Docker's buildx tool, which is a part of Docker BuildKit. This tool allows you to create images for different platforms from a single build command. Here's a basic rundown of the steps:

  1. Enable experimental features by setting "experimental": "enabled" in your Docker configuration file (~/.docker/config.json).

  2. Install QEMU on your macOS to emulate different architectures:

    brew install qemu
    
  3. Create a new builder that enables buildx and specify the platforms you want to target:

    docker buildx create --name mybuilder --use
    
  4. Inspect the builder to ensure it's correctly configured and can build for the target platforms:

    docker buildx inspect mybuilder --bootstrap
    
  5. Build and push the image to Docker Hub (or another registry) for the desired platforms using the --platform flag:

    docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t <username>/myimage:latest --push .