Q
Q
QPoser2020-09-19 07:43:46
macOS
QPoser, 2020-09-19 07:43:46

Running Docker on MacOS using a virtual machine?

I set up Docker for Mac, launched a project on it, but it started to work too slowly.

I read about the fact that you can use Parallels or VMware so that the docker will work from under the virtual machine, and I will access it from the macOS side.

Installed docker-machine via brew, docker for mac, parallels. I wrote eval $(docker-machine env parallels), and launched the build and project launch. In parallels virtualke docker ps shows that the containers are assembled. But it doesn't work the way I would like it to.

Questions:
1. Ports did not pretend to be in macOS, I could not get a response from nginx from the browser, I could not connect to the database, did I miss something?

2. When rebuilding the project, everything crashes until I delete the past container data (this mainly concerns the database), why can this be?

3. Will file changes in such a case affect what happens in the parallels machine? Or do you need to add something else?

4. If anyone has run such a case, tell me how it works for you? How did you run docker this way?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2020-09-23
@kRosis

Virtualka is an additional layer that will eat resources. If it works slowly in containers where the host is your poppy, then, apparently, the resources of the laptop itself are not enough.
1. Did the docker send ports to the virtual machine? Did the virtual machine throw the network / ports on the poppy?
2. What does past container data mean?
3. Changes to what files?
4. My cases:
poppy, virtual machines through vagrant + vbox, inside virtual machines everything is rolled out through ansible - I use
poppy for tests, docker is on it, then docker-compose up -d or docker run -d - I use it for long-running services

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question