zoukankan      html  css  js  c++  java
  • docker plugin test

     docker build -t docker-volume-drbd .
     id=$(docker create docker-volume-drbd true)
     docker export $id -o img.tar

    解压到rootfs

    scp.sh `pwd`/drbd_plugin /home/ubuntu 

    docker plugin create drbd ./drbd_plugin

    docker plugin enable test

    docker volume create -d test -o sshcmd=mhc@1111:pppp -o password=123 testvolume

    ubuntu@9f8967ee-e741-4638-9c93-d88f37e2ec01:~/plugin_test$ docker volume ls
    DRIVER              VOLUME NAME
    test:latest         testvolume

    Run 'docker volume COMMAND --help' for more information on a command.
    ubuntu@9f8967ee-e741-4638-9c93-d88f37e2ec01:~/plugin_test$ docker volume inspect testvolume
    [
        {
            "Driver": "test:latest",
            "Labels": {},
            "Mountpoint": "/mnt/volumes/ea700c1b8e3d0add8de24006225f52da",
            "Name": "testvolume",
            "Options": {
                "password": "123",
                "sshcmd": "mhc@1111:pppp"
            },
            "Scope": "local"
        }
    ]

     scp drbd-docker-plugin 109.105.7.96:/tmp && ssh 109.105.7.96 scp /tmp/drbd-docker-plugin ubuntu@109.105.30.106:/home/ubuntu

    docker run -d -v test1:/test registry.bst-1.cns.bstjpc.com:5000/debian:jessie bash -c "while true;do echo haha >> /test/a.txt;sleep 5;done"
    docker rm $(docker ps -qa) && docker volume rm test1 && docker plugin disable drbd && docker plugin rm drbd
    docker plugin create drbd ./drbd_plugin && docker plugin enable drbd && cat ./log/test.log && docker volume create -d drbd test1

    docker run -ti --rm --volume-driver=test2 -v haha2:/test registry.bst-1.cns.bstjpc.com:5000/debian:jessie bash

  • 相关阅读:
    Unity Technologies-提供全面的技术支持服务
    Unity 大中华区核心业务
    帕斯卡(pascal)命名法:
    骆驼命名法
    匈牙利命名法
    软件分类
    模型规范
    命名规范
    22. Generate Parentheses 生成括号
    421. Maximum XOR of Two Numbers in an Array 数组中两个数的最大异或
  • 原文地址:https://www.cnblogs.com/mhc-fly/p/7779600.html
Copyright © 2011-2022 走看看