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

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

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

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

[[email protected] core]# pip install docker-py

// After install docker-py, CORE is abnormal, so, uninstall it.

[[email protected] core]# pip uninstall docker-py

[[email protected] ~]# 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

[[email protected] docker-py-master]# pwd

/opt/tools/network_simulators/core/docker-py-master

[[email protected] 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

[[email protected] docker-py-master]# systemctl start docker

[[email protected] 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 <[email protected]>

---> 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 <[email protected]>

---> 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]\nprompt=no\ndistinguished_name = req_distinguished_name\n[req_distinguished_name]\ncountryName=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

[[email protected] docker-py-master]#

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

[[email protected] 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

[[email protected] 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

[[email protected] 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

[[email protected] docker-py-master]#

时间: 2024-10-27 19:02:01

(OK) Fedora 23——CORE——docker——(6)——> install-docker-py-1.8.1的相关文章

Docker 0x03:Install Docker

目录 Install Docker Centos yum 安装 运行docker-daemon并开机自启动 运行hello-world应用docker容器中 Ubn Install Docker docker现在分Moby,Docker CE 和Docker EE.由于docker开源后,将docker开源项目变为了Moby项目.对于想开发docker的人现在转移到Moby,而对于我们使用docker的用户,即再docker上有的应用开发和维护,还是关注docker EE. Centos yum

How To Install Docker On Ubuntu 18.04

Docker is an increasingly popular software package that creates a container for application development. Developing in Docker speeds up applications, as it shares the kernel and other resources, instead of requiring dedicated resources. There are two

Ubuntu-Docker[1]安装Docker,通过Docker部署net core代码,需要结合[.NET Core 18]发布、ASP.NET Core Docker部署

1)通过系统自带包安装 通过自带包安装,可能Docker版本较旧 $ sudo apt-get update Reading package lists... Done $ sudo apt-get install -y docker.io {{{-y表示同意.没有-y也可执行,系统会问是否安装,输入y回车即可 apt-get -y install这个指令则是跳过系统提示,直接安装.}}} Adding group `docker' (GID 121) ... Done. docker star

Linux下自动化部署ASP.NET CORE 3.1(Docker+Jenkins+Nginx)

1.先配置好Docker阿里云加速,可以使用阿里云容器服务 (可自己在阿里云申请,要不然安装东西直接很慢)注意:https://XXXX.mirror.aliyuncs.com为阿里云加速服务分配地址 sudo mkdir -p /etc/docker sudo tee /etc/docker/daemon.json <<-'EOF' { "registry-mirrors": ["https://XXXX.mirror.aliyuncs.com"] }

Install Docker on Mac OS X(转)

Install Docker on Mac OS X You can install Docker using Boot2Docker to run docker commands at your command-line. Choose this installation if you are familiar with the command-line or plan to contribute to the Docker project on GitHub. Alternatively,

install docker on centos7

copy from:https://www.youtube.com/watch?v=pm55BUwQ0iE # Prerequisites - Kernel must be 3.10 at minimum - For checking kernel version, use this command: uname -r # Add Docker's repository - Create file docker.repo and save it in /etc/yum.repos.d/ sudo

install docker

官网安装地址 https://docs.docker.com/engine/installation/linux/centos/ 先找官网 是个不错的思路 这里只贴yum安装的方法 install with yum  1.登录的用户用户需要有sudo 权限或者是root 2.更新系统的包,尽量都保持最新的 3.内核最好大于等于3.10.x,如果小于比较麻烦,这里不做介绍 以下我均是直接用root操作的,非root用户执行命令加sudo 4.添加yum源 直接复制粘贴回车即可,不用创建文件 $ s

Docker - Install docker on CentOS

1. 准备 由于 Dokcer 需要 64bit OS, 版本号 3.10 或者更新的版本.所以,需要我们先确认我们的 CentOS 系统 $ uname -r output :: 3.10.0-229.el7.x86_64 2.使用Yum 安装 2.1 更新 yum 到最新版本 $ yum update 2.2 Add the yum repo $ sudo tee /etc/yum.repos.d/docker.repo <<-'EOF' [dockerrepo] name=Docker

Gitlab CI 自动部署 asp.net core web api 到Docker容器

为什么要写这个? 在一个系统长大的过程中会经历不断重构升级来满足商业的需求,而一个严谨的商业系统需要高效.稳定.可扩展,有时候还不得不考虑成本的问题.我希望能找到比较完整的开源解决方案来解决持续集成.监控报警.以及扩容和高可用性的问题.是学习和探索的过程分享给大家,也欢迎同行的人交流. 先来一个三步曲,我们将完成通过GitLab CI 自动部署 net core web api 到Docker 容器的一个示例.这是第一步,通过此文您将了解如何将net core web api 运行在Docker