You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
captaincandy:functional-tester$ uname -v
Darwin Kernel Version 15.3.0: Thu Dec 10 18:40:58 PST 2015; root:xnu-3248.30.4~1/RELEASE_X86_64
captaincandy:functional-tester$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.11.3
BuildVersion: 15D21
Both docker and docker-machine were installed via brew.
I can see my (lack of) containers on the machine just fine:
captaincandy:functional-tester$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
If I try to run the same command from a bash script, it fails:
captaincandy:functional-tester$ cat docker.sh
docker ps -a
captaincandy:functional-tester$ bash docker.sh
The server probably has client authentication (--tlsverify) enabled. Please check your TLS client certification settings: Get https://104.236.36.179:2376/v1.22/containers/json?all=1: remote error: bad certificate
but if I run it with source, it works:
captaincandy:functional-tester$ source docker.sh
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
captaincandy:functional-tester$
even though the environment variables are the same!
captaincandy:functional-tester$ env | grep DOCKER
DOCKER_HOST=tcp://104.236.36.179:2376
DOCKER_OPTS=-H tcp://104.236.36.179:2376 --tls --tlskey /Users/captaincandy/.docker/machine/machines/test1/server-key.pem --tlscert /Users/captaincandy/.docker/machine/machines/test1/server.pem --tlsverify --tlscacert /Users/captaincandy/.docker/machine/machines/test1/ca.pem
DOCKER_MACHINE_NAME=test1
DOCKER_TLS_VERIFY=1
DOCKER_CERT_PATH=/Users/captaincandy/.docker/machine/machines/test1
captaincandy:functional-tester$ cat docker.sh
env | grep DOCKER
docker ps -a
captaincandy:functional-tester$ bash docker.sh
DOCKER_HOST=tcp://104.236.36.179:2376
DOCKER_OPTS=-H tcp://104.236.36.179:2376 --tls --tlskey /Users/captaincandy/.docker/machine/machines/test1/server-key.pem --tlscert /Users/captaincandy/.docker/machine/machines/test1/server.pem --tlsverify --tlscacert /Users/captaincandy/.docker/machine/machines/test1/ca.pem
DOCKER_MACHINE_NAME=test1
DOCKER_TLS_VERIFY=1
DOCKER_CERT_PATH=/Users/captaincandy/.docker/machine/machines/test1
The server probably has client authentication (--tlsverify) enabled. Please check your TLS client certification settings: Get https://104.236.36.179:2376/v1.22/containers/json?all=1: remote error: bad certificate
captaincandy:functional-tester$
What's going on here?
Furthermore, you may have noticed I'm using DOCKER_OPTS. Why must I use DOCKER_OPTS if the relevant env variables (DOCKER_HOST, etc.) are already set? Could this be relevant?
----------END REPORT ---------
The text was updated successfully, but these errors were encountered:
If you are reporting a new issue, make sure that we do not have any duplicates already open. You can ensure this by searching the issue list for this repository. If there is a duplicate, please close your issue and add a comment to the existing issue instead.
If you suspect your issue is a bug, please edit your issue description to include the BUG REPORT INFORMATION shown below. If you fail to provide this information within 7 days, we cannot debug your issue and will close it. We will, however, reopen it if you later provide the information.
For more information about reporting issues, see CONTRIBUTING.md.
You don't have to include this information if this is a feature request
(This is an automated, informational response)
BUG REPORT INFORMATION
Use the commands below to provide key information from your environment:
docker version: docker info:
Provide additional environment details (AWS, VirtualBox, physical, etc.):
List the steps to reproduce the issue:
1.
2.
3.
Describe the results you received:
Describe the results you expected:
Provide additional info you think is important:
----------END REPORT ---------
#ENEEDMOREINFO
ebuchman
changed the title
can't use docker from bash script
can't use docker from bash script on OSX
Feb 6, 2016
BUG REPORT INFORMATION
docker version:
docker info:
Both docker and docker-machine were installed via brew.
I launched a machine on digital ocean:
I can see my (lack of) containers on the machine just fine:
If I try to run the same command from a bash script, it fails:
but if I run it with
source
, it works:even though the environment variables are the same!
What's going on here?
Furthermore, you may have noticed I'm using
DOCKER_OPTS
. Why must I useDOCKER_OPTS
if the relevant env variables (DOCKER_HOST, etc.) are already set? Could this be relevant?----------END REPORT ---------
The text was updated successfully, but these errors were encountered: