【国产化系列】银河麒麟系统(龙芯3A4000)上docker安装指南

DATE: 2021.10.15


1、Docker安装包下载

Docker - 龙芯开源社区 (loongnix.cn)

2、docker安装方法

直接使用deb安装包进行安装:

sudo dpkg –i docker-ce_18.06.3.ce-1_mips64el.deb

注:
1、采用rpm安装会存在大量依赖问题。
2、docker安装包下载地址:https://download.csdn.net/download/SoaringLee_fighting/85064733

3、启动docker服务

systemctl start docker.service

出现下述问题:docker服务启动不成功。

解决方案:
1、 创建镜像文件为/etc/docker/daemon.conf:

{
 "insecure-registries" : ["$your_registry:$your_registry_port"],
 "registry-mirrors": ["$your_registry_url"],
 "storage-driver": "devicemapper",
    "runtimes": {
        "nvidia": {
            "path": "nvidia-container-runtime",
            "runtimeArgs": []
            }
    }
}

4、制作基础镜像

4.1、通过tar 备份目录

tar -cvpf /home/buildrpm.tar --directory=/ --exclude=proc --exclude=sys --exclude=dev --exclude=run /
[root@localhost home]# ls
buildrpm.tar

4.2、导入镜像

cat buildrpm.tar | docker import - buildrpm。

如果提示Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
则先运行docker service

[root@localhost home]# service docker start

4.3、运行

[root@localhost home]# docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
buildrpm            latest              15adc9614eb8        17 seconds ago      1.14 GB
[root@localhost home]# docker run -it buildrpm:latest /bin/bash

4.4、删除:

[root@localhost home]# docker ps -a
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS                     PORTS               NAMES
920f5a69f58d        buildrpm:latest     "/bin/bash"         2 minutes ago       Exited (0) 2 minutes ago                       laughing_minsky
[root@localhost home]# docker rm 920f5a69f58d
920f5a69f58d
[root@localhost home]# docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
buildrpm            latest              15adc9614eb8        4 minutes ago       1.14 GB
[root@localhost home]# docker rmi 15adc9614eb8
Untagged: buildrpm:latest
Deleted: sha256:15adc9614eb815974edfaca89671f86ea61e46929792c42f7515dfd65ff24688
Deleted: sha256:aed61d9930e43fbf0c5d3a771b9dde602b0dda2fec6066a166d2ba9180402880
[root@localhost home]# docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE

5、升级gcc版本

http://ftp.loongnix.cn/toolchain/gcc/release/mips/gcc7/

6、参考

CentOS7 启动docker.service失败
龙芯移植docker指南
媒体编解码 - 龙芯开源社区 (loongnix.cn)
基于当前系统制作docker镜像


THE END!

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

飞翔的鲲

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值