Compose: InsecurePlatformWarning

Created on 26 Jul 2015  Â·  15Comments  Â·  Source: docker/compose

On OS/X I get the error below whenever running docker-compose.

(NOTE, I have already installed sudo pip install --upgrade requests[security])

/usr/local/Cellar/fig/1.3.3/libexec/vendor/lib/python2.7/site-packages/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning

Most helpful comment

if you have python installed via homebrew, do this:

sudo mv /usr/bin/python /usr/bin/python.old
sudo ln -s /usr/local/bin/python /usr/bin/python

that fixed the problem for me.

All 15 comments

I had this issue as well on os x which never has a pip install of compose.

Do this (which you can find if you follow the link you posted):

$ pip install pyopenssl ndg-httpsclient pyasn1

Fixed my issue.
On Jul 26, 2015 2:31 PM, "Rich Burdon" [email protected] wrote:

On OS/X I get the error below whenever running docker-compose.

(NOTE, I have already installed sudo pip install --upgrade
requests[security])

/usr/local/Cellar/fig/1.3.3/libexec/vendor/lib/python2.7/site-packages/requests/packages/urllib3/util/ssl_.py:90:
InsecurePlatformWarning: A true SSLContext object is not available. This
prevents urllib3 from configuring SSL appropriately and may cause certain
SSL connections to fail. For more information, see
https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning
.
InsecurePlatformWarning

—
Reply to this email directly or view it on GitHub
https://github.com/docker/compose/issues/1768.

Hi ljrittle, thanks, but I already tried this too.

The only thing I can think of is that docker-compose hard codes /usr/bin/python which is the system interpreter, which is version 2.7.6 (not 2.7.10 which is installed via brew).

Same problem here, installed docker-compose using homebrew.

I'm also having this issue.

+1 - any estimate on timing for correction? or temporary workaround?

@tabr0201 et al,

I was also having this issue and tried all of the above to no avail. Fortunately, a new docker-compose release candidate seems to take care of it: https://github.com/docker/compose/releases/tag/1.4.0rc2

# uninstall docker-compose (if installed via homebrew)
$ brew uninstall docker-compose && brew cleanup && brew doctor

# download binary
$ curl -L https://github.com/docker/compose/releases/download/1.4.0rc2/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose

# set binary as executable
$ chmod +x /usr/local/bin/docker-compose
  • You will get this warning if you installed Compose via Pip and your Python is older than 2.7.9.
  • You should never get this warning if you installed using the binary. Please let us know if you do.
  • Homebrew isn't an officially supported install method. I don't know whether or not it locks Compose to the system Python.

It's seems like you don't need the data directory for MongoDb, removing those lines from your docker-composer.yml should run without problems.

The data directory is only used by mongo for cache.

if you have python installed via homebrew, do this:

sudo mv /usr/bin/python /usr/bin/python.old
sudo ln -s /usr/local/bin/python /usr/bin/python

that fixed the problem for me.

@zekus If I did this, I got the SLL cert failed error from https://github.com/docker/compose/issues/890

@zekus solution worked for me.

I'm still experiencing this issue. See #2343. None the suggested fixes work.

:+1: thanks @zekus

Option to install via pip should be removed from the docs.

Was this page helpful?
0 / 5 - 0 ratings