docker-for-mac

How to get IP address of running docker container

别等时光非礼了梦想. 提交于 2019-12-03 00:46:02
问题 I am using Docker for Mac. I am running a nodejs based microservice in a Docker container. I want to test node microservice through the browser. How to get IP address of running docker container? 回答1: If you don't want to map ports from your host to the container you can access directly to the docker range ip for the container. This range is by default only accessed from your host. You can check your container network data doing: docker inspect <containerNameOrId> Probably is better to filter

docker on OSX slow volumes

匆匆过客 提交于 2019-12-02 21:56:30
I'm trying to use docker beta on OSX, mainly for Symfony development but the mounted volumes are incredible slow. Even for a vanilla Symfony project I get 6s page load time. That's unbearable! Has anyone found a solution to this issue? Trying to move away from vagrant but I just can't find any reasonable way to work with docker instead. Okay the user Spiil gave a solution but I wanted to elaborate on the exact steps to take since I went through 12 hours trying to figure it out, but once you know how its super easy and fixes all the slow down issues! The key here is to understand this solution

How to get IP address of running docker container

荒凉一梦 提交于 2019-12-02 16:08:58
I am using Docker for Mac. I am running a nodejs based microservice in a Docker container. I want to test node microservice through the browser. How to get IP address of running docker container? If you don't want to map ports from your host to the container you can access directly to the docker range ip for the container. This range is by default only accessed from your host. You can check your container network data doing: docker inspect <containerNameOrId> Probably is better to filter: docker inspect <containerNameOrId> | grep '"IPAddress"' | head -n 1 Usually, the default docker ip range

How do you get around the size limitation of Docker.qcow2 in the Docker for Mac?

大城市里の小女人 提交于 2019-11-30 06:10:30
I have a large (100gb+) database that I'm trying to run with the official postgres image . I can't store the data in a docker volume because the ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/Docker.qcow2 file in Docker for Mac has a size limitation of about 60gb. I'm hesitant to mount a host directory as a volume because file access in mounted host directory volumes is much slower than regular volumes. These are some useful links that go into more detail on these issues: This discusses the size limitation of the Docker.qcow2 file This also discusses the size

How do I restart Docker for Mac from the terminal?

最后都变了- 提交于 2019-11-30 00:18:56
Docker for Mac has a neat little 'restart' button in the dropdown from the whale icon in the menu bar. I'd like to be able to restart Docker for Mac from the terminal, though. What command would I need to run? Specifically for Docker for Mac, because it's a "GUI" app, there's a workaround : osascript -e 'quit app "Docker"' Since you'd want to restart, here's the way to open it from the command line : open -a Docker There's probably a more symmetrical command to open using osascript , but the open command seems more common than the osascript one. Looks like there is no way to perform this. I

How do you get around the size limitation of Docker.qcow2 in the Docker for Mac?

流过昼夜 提交于 2019-11-29 05:49:24
问题 I have a large (100gb+) database that I'm trying to run with the official postgres image. I can't store the data in a docker volume because the ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/Docker.qcow2 file in Docker for Mac has a size limitation of about 60gb. I'm hesitant to mount a host directory as a volume because file access in mounted host directory volumes is much slower than regular volumes. These are some useful links that go into more detail on these

How do I restart Docker for Mac from the terminal?

不打扰是莪最后的温柔 提交于 2019-11-28 19:34:09
问题 Docker for Mac has a neat little 'restart' button in the dropdown from the whale icon in the menu bar. I'd like to be able to restart Docker for Mac from the terminal, though. What command would I need to run? 回答1: Specifically for Docker for Mac, because it's a "GUI" app, there's a workaround: osascript -e 'quit app "Docker"' Since you'd want to restart, here's the way to open it from the command line: open -a Docker There's probably a more symmetrical command to open using osascript , but

docker on OSX slow volumes

折月煮酒 提交于 2019-11-27 13:31:44
问题 I'm trying to use docker beta on OSX, mainly for Symfony development but the mounted volumes are incredible slow. Even for a vanilla Symfony project I get 6s page load time. That's unbearable! Has anyone found a solution to this issue? Trying to move away from vagrant but I just can't find any reasonable way to work with docker instead. 回答1: Okay the user Spiil gave a solution but I wanted to elaborate on the exact steps to take since I went through 12 hours trying to figure it out, but once

Docker: Mounts denied. The paths … are not shared from OS X and are not known to Docker

走远了吗. 提交于 2019-11-27 11:38:00
The command docker run -v /var/folders/zz/... produces the following error. docker: Error response from daemon: Mounts denied: The paths /var/folders/zz/... and /var/folders/zz/... are not shared from OS X and are not known to Docker. You can configure shared paths from Docker -> Preferences... -> File Sharing. When I do open File Sharing, I see that /private is listed already. If I attempt to add /var/folder/ , it resolves to /private/var/folders , which is a subset of /private and hence the addition is rejected. To summarize, it looks to me like the directory /var/folders/.. is shared by OS

How to access the VM created by docker's HyperKit?

廉价感情. 提交于 2019-11-27 09:02:04
问题 Docker for Mac uses a Linux VM created by HyperKit for storing and running containers on Mac. With Docker Toolbox, I can just open VirtualBox and access the docker-machine VM. But with Docker for Mac, how do I access the VM created by HyperKit? 回答1: Update 2019-01-31, thanks to ru10's update, now there is a better way: screen ~/Library/Containers/com.docker.docker/Data/vms/0/tty Original Answer: After a while, I found following way to get a shell of the VM that was created by HyperKit: Run