Installing Docker and Docker Compose on Huawei Cloud Kunpeng Server

environment description

Cloud server specifications Server system
Kunpeng memory optimized type (km1.xlarge.8): 4vCPUs, 32GiB CentOS 7.6 64bit with ARM, public image

Install Docker

Direct installation

## 该方式安装的docker版本较旧
$ yum install docker

Download the installation package and install it

## 安装包要选择arm版本的
$ wget -c https://download.docker.com/linux/static/stable/aarch64/docker-19.03.6.tgz
$ tar -zxvf docker-19.03.6.tgz 
$ mv docker/* /usr/bin/

Install Docker Compose

Direct installation

## 该方式安装的docker-compose版本较旧
$ yum install docker-compose

Download and install from github

You can manually download aarch64's docker-compose from github , or you can follow the following steps to install it:

# 由于网络原因或主机配置原因,可能需要先执行以下指令
$  git config http.sslVerify "false"
$ git config --global  --unset https.https://github.com.proxy 
$ git config --global  --unset http.https://github.com.proxy
# 从github拉取源码
$ git clone https://github.com/aiminickwong/docker-compose-aarch64.git
# 修改dockerfile
$ cd docker-compose-aarch64
$ vim Dockerfile
# 注释掉第9行的RUN [ "cross-build-start" ],否则会出现exec format error错误
# 根据需要修改第12行的ENV DOCKER_COMPOSE_VER 1.22.0,将1.22.0换成你需要的docker-compose版本
# 执行镜像构建
$ docker run --rm -v "$(pwd)":/dist docker-compose-aarch64-builder
# 此时可以看到当前目录下生成了一个docker-compose的可执行文件
$ cp docker-compose-Linux-aarch64 /usr/bin/docker-compose
$ docker-compose -version

references

  1. Kunpeng platform installation docker-compose reference

Guess you like

Origin blog.csdn.net/Loiterer_Y/article/details/127316713