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

Don't require homedir to be docker-shared (Warning message on ddev start "failed to copy root CA into docker volume" ) #2398

Closed
rfay opened this issue Jul 19, 2020 · 2 comments · Fixed by #2456
Milestone

Comments

@rfay
Copy link
Member

rfay commented Jul 19, 2020

Describe the bug

macOS: It you docker-share a subdirectory of the homedir instead of the whole homedir, you get this complaint on start:

failed to copy root CA into docker volume: failed to StartContainer: API error (500): Mounts denied:
The path /Users/rfay/Library/Application Support/mkcert
is not shared from OS X and is not known to Docker.
You can configure shared paths from Docker -> Preferences... -> File Sharing.
See https://docs.docker.com/docker-for-mac/osxfs/#namespaces for more info.
.
, output=''
Pushed mkcert rootca certs to ddev-global-cache

I'm pretty sure this is not necessary. I also can't see where it breaks https; https seems to be trusted anyway.

Also, this is a warning message instead of an error.

To Reproduce

  • In Docker's file sharing setup, do not share /Users (just share, for example, /Users/rfay/workspace
  • ddev poweroff
  • ddev start

Expected behavior

Should "just work"

Screenshots

Default__bash_

Version and configuration information (please complete the following information):

  • macOS Catalina
  • Docker Desktop edge 2.3.3.0
  • ddev version information v1.15.0
@rfay rfay added this to the v1.16 milestone Jul 19, 2020
@rfay
Copy link
Member Author

rfay commented Jul 19, 2020

This is a result of https://github.com/drud/ddev/blob/9bb78d5ba819f3f9a1907995eb9e07de79d67417/pkg/ddevapp/ddevapp.go#L890-L897

We use a mount to push it in there; instead we can use docker cp I think.

@rfay
Copy link
Member Author

rfay commented Jul 20, 2020

Overall, the push should be done in StartDdevRouter() instead of in ddevapp.Start(). That's simpler and more appropriate. And it shouldn't be done if the router is already going, or even already exists.

The current code is pretty elegant as far as docker interactions go; they don't make it easy to push stuff into a volume.

I experimented with

  1. Create container mounting ddev-global-cache
  2. docker cp into /mnt/ddev-global-cache
  3. Exec the chown/chmod to make those available permissions-wise.

But it was 3 steps instead of one. I wasnt' really happy with that.

@rfay rfay changed the title Warning message on ddev start "failed to copy root CA into docker volume" Warning message on ddev start "failed to copy root CA into docker volume" (unshared homedir) Jul 23, 2020
@rfay rfay changed the title Warning message on ddev start "failed to copy root CA into docker volume" (unshared homedir) Don't require homedir to be docker-shared (Warning message on ddev start "failed to copy root CA into docker volume" ) Aug 15, 2020
rfay added a commit that referenced this issue Aug 18, 2020
…intenance, fixes #2398 (#2456)

* Add TLSv1.3 to ddev-router, remove support for TLS1, 1.1
* Bump nginx to stable v1.18
* Use http 1.1 and keepalive in upstreams
* New dockerutils.CopyToVolume and TestCopyToVolume
* Simplify recommended docker command in docs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant