Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Oct 26, 2019. It is now read-only.

Adjust options when DOCKER_TLS_VERIFY is enabled #165

Merged
merged 1 commit into from
Feb 20, 2016
Merged

Adjust options when DOCKER_TLS_VERIFY is enabled #165

merged 1 commit into from
Feb 20, 2016

Conversation

sandaemc
Copy link
Contributor

@joelwurtz , can you look into this?

The DockerClient::createFromEnv not producing correct connection param.

Current output is:

Array
(
    [remote_socket] => tcp://192.168.99.100:2376
    [ssl] => Array
        (
            [cafile] => /Users/smacalalag/.docker/machine/machines/default/ca.pem
            [local_cert] => /Users/smacalalag/.docker/machine/machines/default/cert.pem
            [local_pk] => /Users/smacalalag/.docker/machine/machines/default/key.pem
            [peer_name] => boot2docker
        )

)

Should be:

Array
(
    [remote_socket] => tcp://192.168.99.100:2376
    [ssl] => 1
    [stream_context_options] => Array
        (
            [ssl] => Array
                (
                    [cafile] => /Users/smacalalag/.docker/machine/machines/default/ca.pem
                    [local_cert] => /Users/smacalalag/.docker/machine/machines/default/cert.pem
                    [local_pk] => /Users/smacalalag/.docker/machine/machines/default/key.pem
                    [peer_name] => boot2docker
                )

        )

)

Also, If peer_name is not set, then the name is guessed based on the hostname used when opening the stream. So, I made changes on how the peer_name should be added.

@joelwurtz
Copy link
Member

👍 Thanks !

joelwurtz added a commit that referenced this pull request Feb 20, 2016
Adjust options when DOCKER_TLS_VERIFY is enabled
@joelwurtz joelwurtz merged commit 5d2a65b into docker-php:1.22 Feb 20, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants