version: 2.1 jobs: build-amd64: machine: image: ubuntu-2004:current steps: - checkout - run: name: Prepare .env file command: | cp .env.production.example .env.production - run: name: Build and push AMD64 image command: | docker login -u $DOCKERHUB_USERNAME -p $DOCKERHUB_TOKEN docker build --platform linux/amd64 -t dokploy/dokploy:latest-amd64 . docker push dokploy/dokploy:latest-amd64 build-arm64: machine: image: ubuntu-2004:current resource_class: arm.large steps: - checkout - run: name: Prepare .env file command: | cp .env.production.example .env.production - run: name: Build and push ARM64 image command: | docker login -u $DOCKERHUB_USERNAME -p $DOCKERHUB_TOKEN docker build --platform linux/arm64 -t dokploy/dokploy:latest-arm64 . docker push dokploy/dokploy:latest-arm64 combine-manifests: docker: - image: cimg/base:stable steps: - setup_remote_docker - run: name: Create and push multi-arch manifest command: | VERSION=$(node -p "require('./package.json').version") docker login -u $DOCKERHUB_USERNAME -p $DOCKERHUB_TOKEN docker manifest create dokploy/dokploy:latest \ dokploy/dokploy:latest-amd64 \ dokploy/dokploy:latest-arm64 docker manifest push dokploy/dokploy:latest docker manifest create dokploy/dokploy:${VERSION} \ dokploy/dokploy:latest-amd64 \ dokploy/dokploy:latest-arm64 docker manifest push dokploy/dokploy:${VERSION} workflows: version: 2 build-all: jobs: - build-amd64: filters: branches: only: main - build-arm64: filters: branches: only: main - combine-manifests: requires: - build-amd64 - build-arm64 filters: branches: only: main