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

A couple fixes to make Docker For Mac work #1806

Merged
merged 5 commits into from
Oct 27, 2016
Merged

Conversation

evanphx
Copy link
Contributor

@evanphx evanphx commented Oct 11, 2016

This should fix #1080 as well as #1091


p, err = filepath.EvalSymlinks(p)
if err != nil {
return err
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we should prefix this error with something so we can trace it better (see other errors for examples)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed!

* In -dev mode, `ioutil.TempDir` is used for the alloc and state
directories.
* `TempDir` uses `$TMPDIR`, which os OS X contains a per user
directory which is under `/var/folder`.
* `/var` is actually a symlink to `/private/var`
* Docker For Mac validates the directories that are passed to bind and on
OS X. That whitelist contains `/private`, but not `/var`. It does not
expand the path, and so any paths in `$TMPDIR` fail the whitelist check.

And thusly, by expanding the alloc/state directories the value passed
for binding does contain `/private` and Docker For Mac is happy.
The syslog logging system depends on the ability for a unix socket to be
accessed by the docker daemon in the $TMPDIR of the host. This doesn't
work on Docker For Mac because the docker daemon is running inside a VM,
and while /tmp is accessible, the filesystem used to share them doesn't
support unix socket files, and thus it doesn't work.
@evanphx
Copy link
Contributor Author

evanphx commented Oct 13, 2016

This PR currently triggers a panic: https://gist.github.com/evanphx/e3883d68062ff4c67ee0b6e5633df077

@evanphx
Copy link
Contributor Author

evanphx commented Oct 19, 2016

@jippi
Copy link
Contributor

jippi commented Oct 21, 2016

any love for this PR before 0.5.0 ? :)

@sethvargo
Copy link
Contributor

Hi @jippi

Thank you for your comment. We are currently investigating why this PR is causing an upstream panic and crash. Until we can resolve that, we won't be able to get this into a release. Thanks! 😄

@jippi
Copy link
Contributor

jippi commented Oct 26, 2016

yay @dadgar !

@dadgar dadgar merged commit a186f7a into master Oct 27, 2016
@dadgar dadgar deleted the f-docker4mac-fixes branch October 27, 2016 16:29
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 15, 2023
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.

running example job: failed to create container from image redis:latest: no such image
4 participants