You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

无法找到Docker for Azure CE,寻求本地Ubuntu Docker Swarm部署Azure替代方法

Hey there, sorry to hear you're hitting a roadblock with Docker for Azure CE missing from the Azure Marketplace — it’s frustrating when the official tutorial doesn’t line up with what you’re seeing. The likely culprit here is that Docker deprecated Docker for Azure CE, so it’s no longer listed in the Marketplace. But don’t worry, there are solid alternatives to get your local Docker Swarm deployed to Azure. Let’s break them down:

Alternative 1: Spin up a manual Swarm cluster with Azure VMs

This approach gives you full control over the swarm nodes, just like Docker for Azure CE used to:

  • Provision Ubuntu VMs: Use the Azure CLI to create a manager node and as many worker nodes as you need. For the manager:
    az vm create --resource-group my-swarm-rg --name swarm-manager --image UbuntuLTS --admin-username azureuser --generate-ssh-keys --public-ip-sku Standard
    
    Repeat the command for workers, changing the --name parameter each time.
  • Install Docker on each VM: SSH into every VM and run the official Docker install script:
    curl -fsSL https://get.docker.com -o get-docker.sh && sudo sh get-docker.sh
    sudo usermod -aG docker azureuser
    
    Log out and back in to apply the group change.
  • Initialize the swarm: On the manager node, run:
    docker swarm init --advertise-addr <manager-public-ip>
    
    Copy the docker swarm join command it outputs, then run that on all worker nodes to add them to the swarm.
  • Connect your local Docker to the Azure swarm: To deploy services from your local machine to the Azure swarm, point your Docker client to the manager’s daemon. First, ensure port 2376 is open in the manager’s NSG (for TLS) or use port 2375 (not recommended for production), then set:
    export DOCKER_HOST=tcp://<manager-public-ip>:2376
    
    Now you can use docker stack deploy and other swarm commands just like you would locally.

Alternative 2: Use Azure Container Instances (ACI) with Swarm integration

If you don’t want to manage VMs, Docker Swarm can integrate directly with ACI to run services as managed containers:

  • Log Docker into Azure: From your local machine, run:
    docker login azure
    
  • Create an ACI context: This links your Docker client to your Azure subscription:
    docker context create aci my-aci-swarm
    
  • Deploy your stack to ACI: Use your existing docker-compose.yml to deploy the stack directly to ACI:
    docker --context my-aci-swarm stack deploy -c docker-compose.yml my-app-stack
    
    ACI handles all the infrastructure management, so you don’t have to worry about patching VMs or scaling nodes manually.

Alternative 3: Migrate to Azure Kubernetes Service (AKS) (if flexible on orchestrator)

If you’re open to shifting to Kubernetes (which is widely supported in Azure), you can deploy your Swarm-style workloads to AKS:

  • Create an AKS cluster: Use the Azure CLI to provision a cluster:
    az aks create --resource-group my-aks-rg --name my-aks-cluster --node-count 2 --enable-addons monitoring --generate-ssh-keys
    
  • Link Docker to AKS: Configure your Docker client to use the AKS context:
    az aks get-credentials --resource-group my-aks-rg --name my-aks-cluster
    docker context use kubernetes
    
  • Deploy your stack: Most Swarm docker-compose.yml files work with Kubernetes via Docker’s integration:
    docker stack deploy -c docker-compose.yml my-aks-stack
    
    Note: Some Swarm-specific features (like secrets or configs) map to Kubernetes equivalents, so you might need minor tweaks to your compose file.

Hopefully one of these paths gets you back on track to deploying your swarm workloads to Azure!

内容的提问来源于stack exchange,提问作者tryingHard

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.26 10:02:50