step1. install docker
View https://docs.docker.com/install/
step2. pull composer image
docker pull composer
step3. copy composer.sh
to /usr/bin/composer
sudo cp composer.sh /usr/bin/composer
Success enjoy it.
- aliyun:https://mirrors.aliyun.com/composer/
- tencent cloud:https://mirrors.cloud.tencent.com/composer/
- huawei cloud:https://mirrors.huaweicloud.com/repository/php/
- cnpkg: https://php.cnpkg.org/