Arm64安装docker和docker-compose

1.修改内核配置:

安装补丁包:firefly_linux_defconfig-add-docker-support.patch

2.编译安装

apt-get update
which curl &>/dev/null || apt install curl
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
echo "deb [arch=arm64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" \
     >/etc/apt/sources.list.d/docker.list
 
apt-get update
apt-get -y install --no-install-recommends docker-ce=18.06.2~ce~3-0~ubuntu
 
mkdir -p /etc/docker/
cat > /etc/docker/daemon.json <<EOF
{
  "exec-opts": ["native.cgroupdriver=systemd"],
  "log-driver": "json-file",
  "log-opts": {
    "max-size": "100m"
  },
  "storage-driver": "overlay2"
}
EOF
systemctl enable docker
gpasswd -a firefly docker

注意:如果你改了用户,最后的firefily改成你自己的用户就行

测试:docker run -it alpine uname -a

3.docker-compose安装

apt-get install python-pip

sudo apt-get install libssl-dev libffi-dev

pip install docker-compose

4.测试docker-compose

docker-compose -v

正常输出版本号即可.

 

posted @ 2020-12-12 16:50  漠漠颜  阅读(4722)  评论(2编辑  收藏  举报