• (OK) Fedora 23——CORE——docker——(6)——> install-docker-py-1.8.1



    ------------------------------------------------------------------------

    docker-py 一定要安装正确,否则,CORE 中的 Docker 不能工作。

    ------------------------------------------------------------------------
    [root@localhost core]# pip install docker-py
    // After install docker-py, CORE is abnormal, so, uninstall it.

    [root@localhost core]# pip uninstall docker-py

    [root@localhost ~]# pip uninstall docker-py
    You are using pip version 7.1.0, however version 8.1.1 is available.
    You should consider upgrading via the 'pip install --upgrade pip' command.
    Uninstalling docker-py-1.8.1:
      /usr/lib/python2.7/site-packages/docker/__init__.py
      /usr/lib/python2.7/site-packages/docker/__init__.pyc
    ......
      /usr/lib/python2.7/site-packages/docker_py-1.8.1.dist-info/metadata.json
      /usr/lib/python2.7/site-packages/docker_py-1.8.1.dist-info/top_level.txt
    Proceed (y/n)?


    ----------------------------
    用了一个星期的时间,排除了种种可能出错的原因,终于找到了错误根源
    ----------------------------
    /usr/lib/python2.7/site-packages/core/services/dockersvc.py:    client = Client(version='1.10')
    修改为
    /usr/lib/python2.7/site-packages/core/services/dockersvc.py:    client = Client(version='1.12')
    因为
    # tail /var/log/core-daemon.log
    APIError: 400 Client Error: Bad Request ("client version 1.10 is too old. Minimum supported API version is 1.12, please upgrade your client to a newer version")

    ------------------------------------------------------------------------






    ------------------------------------------------------------------------

    install docker-py from source code

    ------------------------------------------------------------------------
    docker-py-1.8.1.tar.gz

    [root@localhost docker-py-master]# pwd
    /opt/tools/network_simulators/core/docker-py-master


    [root@localhost docker-py-master]# make
    docker build -t docker-py .
    Cannot connect to the Docker daemon. Is the docker daemon running on this host?
    Makefile:11: recipe for target 'build' failed
    make: *** [build] Error 1

    [root@localhost docker-py-master]# systemctl start docker

    [root@localhost docker-py-master]# make
    docker build -t docker-py .
    Sending build context to Docker daemon 545.8 kB
    Step 1 : FROM python:2.7
    2.7: Pulling from library/python
    8b87079b7a06: Pull complete
    a3ed95caeb02: Pull complete
    1bb8eaf3d643: Pull complete
    3e04171ce2e5: Pull complete
    0b73d3fea769: Pull complete
    167a085f33b1: Pull complete
    4cfa46b1ae8d: Pull complete
    3f20114205e3: Pull complete
    Digest: sha256:f64fb8542811e16e34ba0882e5e65fb33b2347ada91b5502fbd7165ffafc5374
    Status: Downloaded newer image for python:2.7
     ---> b7a3b567574d
    Step 2 : MAINTAINER Joffrey F <joffrey@docker.com>
     ---> Running in 45a1642b8d9b
     ---> cd24e25ffe29
    Removing intermediate container 45a1642b8d9b
    Step 3 : RUN mkdir /home/docker-py
     ---> Running in 04afa9500130
     ---> 5191dc668be8
    Removing intermediate container 04afa9500130
    Step 4 : WORKDIR /home/docker-py
     ---> Running in 27ef48a22e12
     ---> 50bb71fb0351
    Removing intermediate container 27ef48a22e12
    Step 5 : COPY requirements.txt /home/docker-py/requirements.txt
     ---> 3355221f4e0f
    Removing intermediate container 9de100c529b8
    Step 6 : RUN pip install -r requirements.txt
     ---> Running in b585531023d7
    Collecting requests==2.5.3 (from -r requirements.txt (line 1))
      Downloading requests-2.5.3-py2.py3-none-any.whl (468kB)
    Collecting six>=1.4.0 (from -r requirements.txt (line 2))
      Downloading six-1.10.0-py2.py3-none-any.whl
    Collecting websocket-client==0.32.0 (from -r requirements.txt (line 3))
      Downloading websocket_client-0.32.0.tar.gz (192kB)
    Collecting backports.ssl-match-hostname>=3.5 (from -r requirements.txt (line 4))
      Downloading backports.ssl_match_hostname-3.5.0.1.tar.gz
    Collecting ipaddress==1.0.16 (from -r requirements.txt (line 5))
      Downloading ipaddress-1.0.16-py27-none-any.whl
    Building wheels for collected packages: websocket-client, backports.ssl-match-hostname
      Running setup.py bdist_wheel for websocket-client: started
      Running setup.py bdist_wheel for websocket-client: finished with status 'done'
      Stored in directory: /root/.cache/pip/wheels/a2/7a/d2/8e42a1d51fe2562c571f2a4859d975942254e92b1815d65ea2
      Running setup.py bdist_wheel for backports.ssl-match-hostname: started
      Running setup.py bdist_wheel for backports.ssl-match-hostname: finished with status 'done'
      Stored in directory: /root/.cache/pip/wheels/5d/72/36/b2a31507b613967b728edc33378a5ff2ada0f62855b93c5ae1
    Successfully built websocket-client backports.ssl-match-hostname
    Installing collected packages: requests, six, websocket-client, backports.ssl-match-hostname, ipaddress
    Successfully installed backports.ssl-match-hostname-3.5.0.1 ipaddress-1.0.16 requests-2.5.3 six-1.10.0 websocket-client-0.32.0
     ---> db4da7c96db6
    Removing intermediate container b585531023d7
    Step 7 : COPY test-requirements.txt /home/docker-py/test-requirements.txt
     ---> 90d26c7aea93
    Removing intermediate container cc62efa004e5
    Step 8 : RUN pip install -r test-requirements.txt
     ---> Running in e64f00aa6dbc
    Collecting mock==1.0.1 (from -r test-requirements.txt (line 1))
      Downloading mock-1.0.1.zip (861kB)
    Collecting pytest==2.7.2 (from -r test-requirements.txt (line 2))
      Downloading pytest-2.7.2-py2.py3-none-any.whl (127kB)
    Collecting coverage==3.7.1 (from -r test-requirements.txt (line 3))
      Downloading coverage-3.7.1.tar.gz (284kB)
    Collecting pytest-cov==2.1.0 (from -r test-requirements.txt (line 4))
      Downloading pytest_cov-2.1.0-py2.py3-none-any.whl
    Collecting flake8==2.4.1 (from -r test-requirements.txt (line 5))
      Downloading flake8-2.4.1-py2.py3-none-any.whl
    Collecting py>=1.4.29 (from pytest==2.7.2->-r test-requirements.txt (line 2))
      Downloading py-1.4.31-py2.py3-none-any.whl (81kB)
    Collecting pyflakes<0.9,>=0.8.1 (from flake8==2.4.1->-r test-requirements.txt (line 5))
      Downloading pyflakes-0.8.1-py2.py3-none-any.whl
    Collecting pep8!=1.6.0,!=1.6.1,!=1.6.2,>=1.5.7 (from flake8==2.4.1->-r test-requirements.txt (line 5))
      Downloading pep8-1.7.0-py2.py3-none-any.whl (41kB)
    Collecting mccabe<0.4,>=0.2.1 (from flake8==2.4.1->-r test-requirements.txt (line 5))
      Downloading mccabe-0.3.1-py2.py3-none-any.whl
    Building wheels for collected packages: mock, coverage
      Running setup.py bdist_wheel for mock: started
      Running setup.py bdist_wheel for mock: finished with status 'done'
      Stored in directory: /root/.cache/pip/wheels/b2/f8/fe/920b7d3b279878045354cde14646f73864cf944501f19e4a1b
      Running setup.py bdist_wheel for coverage: started
      Running setup.py bdist_wheel for coverage: finished with status 'done'
      Stored in directory: /root/.cache/pip/wheels/09/d5/14/fad8864342631171117f01b9b2473a07c053e5c1054d40e48c
    Successfully built mock coverage
    Installing collected packages: mock, py, pytest, coverage, pytest-cov, pyflakes, pep8, mccabe, flake8
    Successfully installed coverage-3.7.1 flake8-2.4.1 mccabe-0.3.1 mock-1.0.1 pep8-1.7.0 py-1.4.31 pyflakes-0.8.1 pytest-2.7.2 pytest-cov-2.1.0
     ---> ae9830513088
    Removing intermediate container e64f00aa6dbc
    Step 9 : COPY . /home/docker-py
     ---> 65d0f28fee0a
    Removing intermediate container e75ec5878dff
    Step 10 : RUN pip install .
     ---> Running in a6b74d043d77
    Processing /home/docker-py
    Requirement already satisfied (use --upgrade to upgrade): requests>=2.5.2 in /usr/local/lib/python2.7/site-packages (from docker-py==1.8.1)
    Requirement already satisfied (use --upgrade to upgrade): six>=1.4.0 in /usr/local/lib/python2.7/site-packages (from docker-py==1.8.1)
    Requirement already satisfied (use --upgrade to upgrade): websocket-client>=0.32.0 in /usr/local/lib/python2.7/site-packages (from docker-py==1.8.1)
    Requirement already satisfied (use --upgrade to upgrade): ipaddress>=1.0.16 in /usr/local/lib/python2.7/site-packages (from docker-py==1.8.1)
    Requirement already satisfied (use --upgrade to upgrade): backports.ssl-match-hostname>=3.5 in /usr/local/lib/python2.7/site-packages (from docker-py==1.8.1)
    Building wheels for collected packages: docker-py
      Running setup.py bdist_wheel for docker-py: started
      Running setup.py bdist_wheel for docker-py: finished with status 'done'
      Stored in directory: /root/.cache/pip/wheels/5d/71/82/1f2418b60d8a6317cd16de415072db851bfc6bb4a09cd43b5e
    Successfully built docker-py
    Installing collected packages: docker-py
    Successfully installed docker-py-1.8.1
     ---> 0ee1a200ab73
    Removing intermediate container a6b74d043d77
    Successfully built 0ee1a200ab73
    docker run docker-py flake8 docker tests
    docker run docker-py py.test tests/unit
    ============================= test session starts ==============================
    platform linux2 -- Python 2.7.11 -- py-1.4.31 -- pytest-2.7.2
    rootdir: /home/docker-py, inifile: pytest.ini
    plugins: cov
    collected 320 items

    tests/unit/api_test.py ......................
    tests/unit/auth_test.py .........................................
    tests/unit/build_test.py .........
    tests/unit/client_test.py .
    tests/unit/container_test.py .............................................................................................
    tests/unit/exec_test.py ....
    tests/unit/image_test.py ........................
    tests/unit/network_test.py ......
    tests/unit/ssladapter_test.py ......
    tests/unit/utils_test.py ...........................................................................................................
    tests/unit/volume_test.py .......

    ========================== 320 passed in 0.93 seconds ==========================
    docker build -t docker-py3 -f Dockerfile-py3 .
    Sending build context to Docker daemon 545.8 kB
    Step 1 : FROM python:3.4
    3.4: Pulling from library/python
    8b87079b7a06: Already exists
    a3ed95caeb02: Pull complete
    1bb8eaf3d643: Already exists
    3e04171ce2e5: Already exists
    0b73d3fea769: Already exists
    167a085f33b1: Already exists
    3eb51259e78a: Pull complete
    73f79c88c6d5: Pull complete
    Digest: sha256:d52f2a6a2a00cbe43fd24c6b7719aa2a49d19f3250e512852a81a5cb497bafa8
    Status: Downloaded newer image for python:3.4
     ---> 8d55768a15a8
    Step 2 : MAINTAINER Joffrey F <joffrey@docker.com>
     ---> Running in 43443377feec
     ---> 23b3468051d5
    Removing intermediate container 43443377feec
    Step 3 : RUN mkdir /home/docker-py
     ---> Running in afc8beaabe88
     ---> ef98ecfdcff1
    Removing intermediate container afc8beaabe88
    Step 4 : WORKDIR /home/docker-py
     ---> Running in 3d1438509e48
     ---> b79d64d395b7
    Removing intermediate container 3d1438509e48
    Step 5 : COPY requirements.txt /home/docker-py/requirements.txt
     ---> 600249173521
    Removing intermediate container f899246f9d8d
    Step 6 : RUN pip install -r requirements.txt
     ---> Running in 2460fee114e3
    Ignoring ipaddress: markers "python_version < '3.3'" don't match your environment
    Collecting requests==2.5.3 (from -r requirements.txt (line 1))
      Downloading requests-2.5.3-py2.py3-none-any.whl (468kB)
    Collecting six>=1.4.0 (from -r requirements.txt (line 2))
      Downloading six-1.10.0-py2.py3-none-any.whl
    Collecting websocket-client==0.32.0 (from -r requirements.txt (line 3))
      Downloading websocket_client-0.32.0.tar.gz (192kB)
    Collecting backports.ssl-match-hostname>=3.5 (from -r requirements.txt (line 4))
      Downloading backports.ssl_match_hostname-3.5.0.1.tar.gz
    Installing collected packages: requests, six, websocket-client, backports.ssl-match-hostname
      Running setup.py install for websocket-client: started
        Running setup.py install for websocket-client: finished with status 'done'
      Running setup.py install for backports.ssl-match-hostname: started
        Running setup.py install for backports.ssl-match-hostname: finished with status 'done'
    Successfully installed backports.ssl-match-hostname-3.5.0.1 requests-2.5.3 six-1.10.0 websocket-client-0.32.0
     ---> a57874fcd6fc
    Removing intermediate container 2460fee114e3
    Step 7 : COPY test-requirements.txt /home/docker-py/test-requirements.txt
     ---> 0a40079ad860
    Removing intermediate container 9b9724988a36
    Step 8 : RUN pip install -r test-requirements.txt
     ---> Running in b6a948bb0be1
    Collecting mock==1.0.1 (from -r test-requirements.txt (line 1))
      Downloading mock-1.0.1.zip (861kB)
    Collecting pytest==2.7.2 (from -r test-requirements.txt (line 2))
      Downloading pytest-2.7.2-py2.py3-none-any.whl (127kB)
    Collecting coverage==3.7.1 (from -r test-requirements.txt (line 3))
      Downloading coverage-3.7.1.tar.gz (284kB)
    Collecting pytest-cov==2.1.0 (from -r test-requirements.txt (line 4))
      Downloading pytest_cov-2.1.0-py2.py3-none-any.whl
    Collecting flake8==2.4.1 (from -r test-requirements.txt (line 5))
      Downloading flake8-2.4.1-py2.py3-none-any.whl
    Collecting py>=1.4.29 (from pytest==2.7.2->-r test-requirements.txt (line 2))
      Downloading py-1.4.31-py2.py3-none-any.whl (81kB)
    Collecting pyflakes<0.9,>=0.8.1 (from flake8==2.4.1->-r test-requirements.txt (line 5))
      Downloading pyflakes-0.8.1-py2.py3-none-any.whl
    Collecting mccabe<0.4,>=0.2.1 (from flake8==2.4.1->-r test-requirements.txt (line 5))
      Downloading mccabe-0.3.1-py2.py3-none-any.whl
    Collecting pep8!=1.6.0,!=1.6.1,!=1.6.2,>=1.5.7 (from flake8==2.4.1->-r test-requirements.txt (line 5))
      Downloading pep8-1.7.0-py2.py3-none-any.whl (41kB)
    Installing collected packages: mock, py, pytest, coverage, pytest-cov, pyflakes, mccabe, pep8, flake8
      Running setup.py install for mock: started
        Running setup.py install for mock: finished with status 'done'
      Running setup.py install for coverage: started
        Running setup.py install for coverage: finished with status 'done'
    Successfully installed coverage-3.7.1 flake8-2.4.1 mccabe-0.3.1 mock-1.0.1 pep8-1.7.0 py-1.4.31 pyflakes-0.8.1 pytest-2.7.2 pytest-cov-2.1.0
     ---> f12f34788bfa
    Removing intermediate container b6a948bb0be1
    Step 9 : COPY . /home/docker-py
     ---> 20f9f0f3b8a0
    Removing intermediate container 3be368f17f54
    Step 10 : RUN pip install .
     ---> Running in 7c830a4bb463
    Processing /home/docker-py
    Requirement already satisfied (use --upgrade to upgrade): requests>=2.5.2 in /usr/local/lib/python3.4/site-packages (from docker-py==1.8.1)
    Requirement already satisfied (use --upgrade to upgrade): six>=1.4.0 in /usr/local/lib/python3.4/site-packages (from docker-py==1.8.1)
    Requirement already satisfied (use --upgrade to upgrade): websocket-client>=0.32.0 in /usr/local/lib/python3.4/site-packages (from docker-py==1.8.1)
    Requirement already satisfied (use --upgrade to upgrade): backports.ssl-match-hostname>=3.5 in /usr/local/lib/python3.4/site-packages (from docker-py==1.8.1)
    Installing collected packages: docker-py
      Running setup.py install for docker-py: started
        Running setup.py install for docker-py: finished with status 'done'
    Successfully installed docker-py-1.8.1
     ---> 4c15d2829d74
    Removing intermediate container 7c830a4bb463
    Successfully built 4c15d2829d74
    docker run docker-py3 py.test tests/unit
    ============================= test session starts ==============================
    platform linux -- Python 3.4.4 -- py-1.4.31 -- pytest-2.7.2
    rootdir: /home/docker-py, inifile: pytest.ini
    plugins: cov
    collected 320 items

    tests/unit/api_test.py ......................
    tests/unit/auth_test.py .........................................
    tests/unit/build_test.py .........
    tests/unit/client_test.py .
    tests/unit/container_test.py .............................................................................................
    tests/unit/exec_test.py ....
    tests/unit/image_test.py ........................
    tests/unit/network_test.py ......
    tests/unit/ssladapter_test.py ......
    tests/unit/utils_test.py ..........................................................s................................................
    tests/unit/volume_test.py .......
    =========================== short test summary info ============================
    SKIP [1] tests/unit/utils_test.py:622: shlex doesn't support bytes in py3

    ==================== 319 passed, 1 skipped in 1.43 seconds =====================
    docker rm -vf dpy-dind || :
    Error response from daemon: No such container: dpy-dind
    docker run -d --name dpy-dind --privileged dockerswarm/dind:1.10.3 docker daemon -H tcp://0.0.0.0:2375
    Unable to find image 'dockerswarm/dind:1.10.3' locally
    1.10.3: Pulling from dockerswarm/dind
    fdd5d7827f33: Pull complete
    a3ed95caeb02: Pull complete
    d5a3951459f4: Pull complete
    5816775da3cb: Pull complete
    d354b3d49d13: Pull complete
    a75bc473e45f: Pull complete
    Digest: sha256:bfba089821e0f4e1e8770c5122ac7060ac15c1bcfe0c999bd0ab640d116c3740
    Status: Downloaded newer image for dockerswarm/dind:1.10.3
    c52e5d6d7a34ca6791571710eadd1856001cbda13fd37a032085b7b1324932ae
    docker run --env="DOCKER_HOST=tcp://docker:2375" --link=dpy-dind:docker docker-py py.test tests/integration
    ============================= test session starts ==============================
    platform linux2 -- Python 2.7.11 -- py-1.4.31 -- pytest-2.7.2
    rootdir: /home/docker-py, inifile: pytest.ini
    plugins: cov
    collected 116 items

    tests/integration/api_test.py ..........
    tests/integration/build_test.py .......
    tests/integration/container_test.py ......................................................
    tests/integration/exec_test.py .......
    tests/integration/image_test.py ..........s
    tests/integration/network_test.py ..............
    tests/integration/regression_test.py ......
    tests/integration/volume_test.py .......
    =========================== short test summary info ============================
    SKIP [1] tests/integration/image_test.py:230: Doesn't work inside a container - FIXME

    =================== 115 passed, 1 skipped in 666.88 seconds ====================
    docker run --env="DOCKER_HOST=tcp://docker:2375" --link=dpy-dind:docker docker-py3 py.test tests/integration
    ============================= test session starts ==============================
    platform linux -- Python 3.4.4 -- py-1.4.31 -- pytest-2.7.2
    rootdir: /home/docker-py, inifile: pytest.ini
    plugins: cov
    collected 116 items

    tests/integration/api_test.py ..........
    tests/integration/build_test.py .......
    tests/integration/container_test.py ......................................................
    tests/integration/exec_test.py .......
    tests/integration/image_test.py ..........s
    tests/integration/network_test.py ..............
    tests/integration/regression_test.py ......
    tests/integration/volume_test.py .......
    =========================== short test summary info ============================
    SKIP [1] tests/integration/image_test.py:230: Doesn't work inside a container - FIXME

    =================== 115 passed, 1 skipped in 562.83 seconds ====================
    docker rm -vf dpy-dind
    dpy-dind
    docker build -t dpy-dind-certs -f tests/Dockerfile-dind-certs .
    Sending build context to Docker daemon 545.8 kB
    Step 1 : FROM python:2.7
     ---> b7a3b567574d
    Step 2 : RUN mkdir /tmp/certs
     ---> Running in 5e85a8e9a975
     ---> a1fecc49dada
    Removing intermediate container 5e85a8e9a975
    Step 3 : VOLUME /certs
     ---> Running in 2526771e3f87
     ---> 819cde6e34ef
    Removing intermediate container 2526771e3f87
    Step 4 : WORKDIR /tmp/certs
     ---> Running in 23fd5815abed
     ---> b44feb2c0762
    Removing intermediate container 23fd5815abed
    Step 5 : RUN openssl genrsa -aes256 -passout pass:foobar -out ca-key.pem 4096
     ---> Running in a6f66fd0e4c6
    Generating RSA private key, 4096 bit long modulus
    ..............++
    .....++
    e is 65537 (0x10001)
     ---> fb8159fd9e9b
    Removing intermediate container a6f66fd0e4c6
    Step 6 : RUN echo "[req] prompt=no distinguished_name = req_distinguished_name [req_distinguished_name] countryName=AU" > /tmp/config
     ---> Running in 8e9d30f5f409
     ---> 3261f82aa690
    Removing intermediate container 8e9d30f5f409
    Step 7 : RUN openssl req -new -x509 -passin pass:foobar -config /tmp/config -days 365 -key ca-key.pem -sha256 -out ca.pem
     ---> Running in 987e87c3fd1c
     ---> ca4482779a99
    Removing intermediate container 987e87c3fd1c
    Step 8 : RUN openssl genrsa -out server-key.pem -passout pass:foobar 4096
     ---> Running in b07f6ff5c99f
    Generating RSA private key, 4096 bit long modulus
    ................................++
    ..........................................................++
    e is 65537 (0x10001)
     ---> 681f28fc6eea
    Removing intermediate container b07f6ff5c99f
    Step 9 : RUN openssl req -subj "/CN=docker" -sha256 -new -key server-key.pem -out server.csr
     ---> Running in 86671bdc82af
     ---> c425271ea0ee
    Removing intermediate container 86671bdc82af
    Step 10 : RUN echo subjectAltName = DNS:docker,DNS:localhost > extfile.cnf
     ---> Running in 5630b7f25fe3
     ---> 9d955a05b1d0
    Removing intermediate container 5630b7f25fe3
    Step 11 : RUN openssl x509 -req -days 365 -passin pass:foobar -sha256 -in server.csr -CA ca.pem -CAkey ca-key.pem -CAcreateserial -out server-cert.pem -extfile extfile.cnf
     ---> Running in 99f858595366
    Signature ok
    subject=/CN=docker
    Getting CA Private Key
     ---> e94026fd19f7
    Removing intermediate container 99f858595366
    Step 12 : RUN openssl genrsa -out key.pem 4096
     ---> Running in 0e81cf4ff56d
    Generating RSA private key, 4096 bit long modulus
    ............................++
    ..........................++
    e is 65537 (0x10001)
     ---> 60fd430fe445
    Removing intermediate container 0e81cf4ff56d
    Step 13 : RUN openssl req -passin pass:foobar -subj '/CN=client' -new -key key.pem -out client.csr
     ---> Running in 3d44b533b9ea
     ---> 7efd977b18dc
    Removing intermediate container 3d44b533b9ea
    Step 14 : RUN echo extendedKeyUsage = clientAuth > extfile.cnf
     ---> Running in 7babf8614ecd
     ---> c1a82b1229a8
    Removing intermediate container 7babf8614ecd
    Step 15 : RUN openssl x509 -req -passin pass:foobar -days 365 -sha256 -in client.csr -CA ca.pem -CAkey ca-key.pem -CAcreateserial -out cert.pem -extfile extfile.cnf
     ---> Running in 13d797e5963f
    Signature ok
    subject=/CN=client
    Getting CA Private Key
     ---> bf6e908e7f6a
    Removing intermediate container 13d797e5963f
    Step 16 : RUN chmod -v 0400 ca-key.pem key.pem server-key.pem
     ---> Running in fd9fac76b89b
    mode of ‘ca-key.pem’ changed from 0644 (rw-r--r--) to 0400 (r--------)
    mode of ‘key.pem’ changed from 0644 (rw-r--r--) to 0400 (r--------)
    mode of ‘server-key.pem’ changed from 0644 (rw-r--r--) to 0400 (r--------)
     ---> 8c0b07f00986
    Removing intermediate container fd9fac76b89b
    Step 17 : RUN chmod -v 0444 ca.pem server-cert.pem cert.pem
     ---> Running in 8f6ba41282b3
    mode of ‘ca.pem’ changed from 0644 (rw-r--r--) to 0444 (r--r--r--)
    mode of ‘server-cert.pem’ changed from 0644 (rw-r--r--) to 0444 (r--r--r--)
    mode of ‘cert.pem’ changed from 0644 (rw-r--r--) to 0444 (r--r--r--)
     ---> cd6d8f5ab6da
    Removing intermediate container 8f6ba41282b3
    Step 18 : CMD cp -R /tmp/certs/* /certs && while true; do sleep 1; done
     ---> Running in 1fc43874914e
     ---> 73b931840fd1
    Removing intermediate container 1fc43874914e
    Successfully built 73b931840fd1
    docker run -d --name dpy-dind-certs dpy-dind-certs
    b7954b8f2a4c0e6490f53dcd35c11a0f57919c87e44385631508d4bd5a2d4661
    docker run -d --env="DOCKER_HOST=tcp://localhost:2375" --env="DOCKER_TLS_VERIFY=1" --env="DOCKER_CERT_PATH=/certs" --volumes-from dpy-dind-certs --name dpy-dind-ssl -v /tmp --privileged dockerswarm/dind:1.10.3 docker daemon --tlsverify --tlscacert=/certs/ca.pem --tlscert=/certs/server-cert.pem --tlskey=/certs/server-key.pem -H tcp://0.0.0.0:2375
    7541ce1698c7d7134d7df11510966f60328590a19515780567cafe7d33a8e02f
    docker run --volumes-from dpy-dind-ssl --env="DOCKER_HOST=tcp://docker:2375" --env="DOCKER_TLS_VERIFY=1" --env="DOCKER_CERT_PATH=/certs" --link=dpy-dind-ssl:docker docker-py py.test tests/integration
    docker: Error response from daemon: Cannot link to a non running container: /dpy-dind-ssl AS /gigantic_hamilton/docker.
    Makefile:41: recipe for target 'integration-dind-ssl' failed
    make: *** [integration-dind-ssl] Error 125
    [root@localhost docker-py-master]#








    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

    [root@localhost docker-py-master]# pip install docker-py
    You are using pip version 7.1.0, however version 8.1.1 is available.
    You should consider upgrading via the 'pip install --upgrade pip' command.
    Collecting docker-py
      Using cached docker_py-1.8.1-py2.py3-none-any.whl
    Requirement already satisfied (use --upgrade to upgrade): backports.ssl-match-hostname>=3.5 in /usr/lib/python2.7/site-packages (from docker-py)
    Requirement already satisfied (use --upgrade to upgrade): ipaddress>=1.0.16 in /usr/lib/python2.7/site-packages (from docker-py)
    Requirement already satisfied (use --upgrade to upgrade): requests>=2.5.2 in /usr/lib/python2.7/site-packages (from docker-py)
    Requirement already satisfied (use --upgrade to upgrade): six>=1.4.0 in /usr/lib/python2.7/site-packages (from docker-py)
    Requirement already satisfied (use --upgrade to upgrade): websocket-client>=0.32.0 in /usr/lib/python2.7/site-packages (from docker-py)
    Requirement already satisfied (use --upgrade to upgrade): urllib3==1.15.1 in /usr/lib/python2.7/site-packages (from requests>=2.5.2->docker-py)
    Installing collected packages: docker-py
    Successfully installed docker-py-1.8.1
    [root@localhost docker-py-master]# pip freeze | grep docker-py
    You are using pip version 7.1.0, however version 8.1.1 is available.
    You should consider upgrading via the 'pip install --upgrade pip' command.
    docker-py==1.8.1
    [root@localhost docker-py-master]# pip freeze | grep docker-py && python --version && docker version
    You are using pip version 7.1.0, however version 8.1.1 is available.
    You should consider upgrading via the 'pip install --upgrade pip' command.
    docker-py==1.8.1
    Python 2.7.11
    Client:
     Version:      1.11.1
     API version:  1.23
     Go version:   go1.5.4
     Git commit:   5604cbe
     Built:        Wed Apr 27 00:57:43 2016
     OS/Arch:      linux/amd64

    Server:
     Version:      1.11.1
     API version:  1.23
     Go version:   go1.5.4
     Git commit:   5604cbe
     Built:        Wed Apr 27 00:57:43 2016
     OS/Arch:      linux/amd64
    [root@localhost docker-py-master]#


  • 相关阅读:
    JS基础(一)异常错误
    实验四 主存空间的分配和回收
    实验三、进程调度模拟程序实验
    学习进度条
    软件工程学期总结
    实验四、主存空间的分配和回收
    诚信与道德
    【操作系统】实验三、进程调度模拟程序实验
    软件工程---在此基础上,进行软件的改进
    【操作系统】实验二 作业调度模拟程序
  • 原文地址:https://www.cnblogs.com/ztguang/p/12646672.html
Copyright © 2020-2023  润新知