When deploying WordPress on Alibaba Cloud ACK (Container Service for Kubernetes) using the official Anolis OS-based image, we encountered issues:
- New container instances failed during stress testing
- Uploaded images occasionally not displaying in WordPress backend
To resolve, we switched to a self-hosted private image registry (ACR).
Steps
1. Enable ACR
Enable Alibaba Cloud Container Registry (Personal Edition), set registry password.
2. Create Namespace & Repository
Create namespace (e.g., myspace), then create image repository.
3. Push WordPress Image from ECS
yum install -y docker
# Configure image accelerator in ACR console
sudo tee /etc/docker/daemon.json <<-'EOF'
{ "registry-mirrors": ["https://xxx.mirror.aliyuncs.com"] }
EOF
sudo systemctl restart docker
docker pull wordpress
Follow ACR repo commands to tag and push:
docker tag wordpress registry.cn-hangzhou.aliyuncs.com/myspace/wordpress:latest
docker push registry.cn-hangzhou.aliyuncs.com/myspace/wordpress:latest
4. Deploy in ACK
Create stateless application using the custom image. Important: set image pull secret, otherwise ACK cannot pull from private registry.
Results
- Container creation speed significantly improved
- WordPress image upload stability greatly improved
- No longer dependent on public image sources