Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use Habitus with Docker for Mac? #17

Closed
corvus-ch opened this issue May 22, 2016 · 6 comments
Closed

How to use Habitus with Docker for Mac? #17

corvus-ch opened this issue May 22, 2016 · 6 comments

Comments

@corvus-ch
Copy link

I just have switched to Docker for Mac and I try to figure out how to use Habitus. So far without any luck.

➜  habitus                                     
2016/05/22 20:34:43 ▶ Using '/path/to/build.yml' as build file                                                                                               
2016/05/22 20:34:43 ▶ open cert.pem: no such file or directory 
➜  habitus --use-tls=false
2016/05/22 20:34:50 ▶ Using '/path/to/build.yml' as build file                                                                                               
2016/05/22 20:34:50 ▶ invalid endpoint 
@khash
Copy link
Member

khash commented May 23, 2016

The latest version of Habitus supports Docker for Mac. You need to use a Linux socket to connect with no TLS.

To disable TLS, use the -use-tls flag.
To use Linux sockets instead of TCP, you can pass in Docker's socket file into --host with something like this:

-- host unix://path/to/socket

@khash khash closed this as completed May 28, 2016
@bibstha
Copy link

bibstha commented Jun 30, 2016

habitus --use-tls=false --host=unix:///var/run/docker.sock --binding=127.0.0.1 works on both mac and linux with the newer docker versions.

@mirestrepo
Copy link

@khash - Where do the secret files live when using Linux sockets?
RUN wget -O /root/.ssh/github_rsa http://$host:8080/secrets/file/id_rsa

gives invalid hostname . I tried replacing $host by 127.0.0.1 and I get connection refused.

@khash
Copy link
Member

khash commented Nov 29, 2016

@mirestrepo secret file location doesn't change depending on the how Habitus connects to the Docker daemon. Have you used them on a non-socket connection successfully?

@mirestrepo
Copy link

@khash Thank you - I figured my issue. Though other issues I realized I should be setting my host to my private ip - ipconfig getifaddr en0

@kpx-dev
Copy link

kpx-dev commented Dec 22, 2016

the command provided by @bibstha should be listed in the Readme file or something, took me a while to get a basic security build up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants