zoukankan      html  css  js  c++  java
  • ROC-RK3308-CC Buildroot上使用Docker

    Docker 是一个开源的应用容器引擎,让开发者可以打包他们的应用以及依赖包到一个可移植的容器中,然后发布到任何流行的 Linux 机器上,也可以实现虚拟化。容器是完全使用沙箱机制,相互之间不会有任何接口。
    Buildroot上做一些开发相比ubuntu等版本麻烦不少,如果结合Docker做应用开发,将会方便快捷很多。
    目前笔者在ROC-RK3308-CC上加上了docker,固件下载链接: https://pan.baidu.com/s/1mtvtkFcNGVvmaPJZSBut6w 提取码: qbh6
    下面演示一下docker在ROC-RK3308-CC上运行的方法:
    1.参考wiki烧写ROC-RK3308-CC_Buildroot_Docker_20181116.img
    2.参考wiki配置网络,比如以太网的话终端(打开调试串口或者adb shell进入)输入:

    udhcpc -i eth0 -R
    

      

    3.查看docker信息:

    / # docker info
    Containers: 5
     Running: 2
     Paused: 0
     Stopped: 3
    Images: 3
    Server Version: 17.05.0-ce
    Storage Driver: overlay2
     Backing Filesystem: extfs
     Supports d_type: true
     Native Overlay Diff: true
    Logging Driver: json-file
    Cgroup Driver: cgroupfs
    Plugins: 
     Volume: local
     Network: bridge host macvlan null overlay
    Swarm: inactive
    Runtimes: runc
    Default Runtime: runc
    Init Binary: docker-init
    containerd version: 9048e5e50717ea4497b757314bad98ea3763c145
    runc version: N/A (expected: 9c2d8d184e5da67c95d601382adf14862e4f2228)
    init version: N/A (expected: )
    Kernel Version: 4.4.143
    Operating System: Buildroot 2018.02-rc3
    OSType: linux
    Architecture: aarch64
    CPUs: 4
    Total Memory: 239.1MiB
    Name: rockchip
    ID: YOD6:GF5Y:RBBS:4AJF:PCAD:V4QU:OTGW:2PKL:CJUN:LKET:FGWN:YAZR
    Docker Root Dir: /userdata/docker/lib
    Debug Mode (client): false
    Debug Mode (server): false
    Registry: https://index.docker.io/v1/
    Live Restore Enabled: false
    

     

    4.运行hello-world

    docker run hello-world
    

      

    来点复杂一些的应用,比如samba:

    docker run -v /userdata/:/mount/ROC-RK3308-CC -p 445:445 -p 139:139 -e USERID=0 -e GROUPID=0  --name samba -d dperson/samba:aarch64 -S -u "firefly;firefly" -s "firefly;/mount/;yes;no;no;all;firefly;firefly;"
    

      

    接下来就可以在其他终端,比如windows cmd上打开,然后操作文件了:

    net use X: \168.168.100.71firefly /u:firefly firefly
    

      

    更多详细内容,进入Firefly开发者社区可以查看

     

  • 相关阅读:
    单独使用mybatis创建多数据源
    【mybatis-oracle】批量插入、批量删除以及xml文件大于号 小于号处理
    让只连了内网某台机器A的机器B能上外网
    python类静态函数和变量,heapq自定义优先级队列
    git 的基础
    Java线程池
    ansible 管理工具
    理解容器跨主机通信一
    Java多线程的实现方式二
    单机容器网络
  • 原文地址:https://www.cnblogs.com/TeeFirefly/p/10374959.html
Copyright © 2011-2022 走看看