I've just installed docker on my mac, and when I try to build a new project (docker-compose build), or even list the containers (docker-compose ps) I always get the following error: Can't find a suitable configuration file in this directory or any parent. Jan 19, 2017 - The installation includes a tool called docker-compose which we will. So port 80 (the default port that Apache runs under) on my Mac, will be.
![Compose Compose](https://blog.alexellis.io/content/images/2018/01/Screen-Shot-2018-01-07-at-10.25.36.png)
Because is a web agency, developpers are used to work on multiple projets at the same time. We have been using Docker for development purposes over the past two year now, and it’s an amazing tool. It allows developers to work on different projects with different technical stacks, and switch projects in a matter of seconds, as well as running two or more project at the same time. It works very well on Linux, but we faced some big issues with Docker on Mac. As our company was staffing its employees with Apple laptops, we had to fix this.
Here is the story of the different tips and tricks we used in order to work efficiently with Docker for Mac. At the beginning we were using with NFS file sharing. The performances weren’t very good and we weren’t achieving native linux perfs but it was quite acceptable. Then Docker released Docker-For-Mac and we naively switched to the official Docker tool for the Mac OS. Unfortunately we faced a BIG issue with filesystem bind mount:. Update network for chromecast on mac.
As we mainly work with PHP projects, especially Symfony or Magento ones, with tens of thousands of PHP files, we were devastated because of the very poor performances Like many other PHP developers we found a workaround:. This tool synchronise your host workspace with a docker volume.
It worked quite well, we reached native linux performances, but there were some drawbacks: • You need to remember to run docker-sync before running your app: We have a wrapping script in order to start docker-sync then the app • When you switch git branch, in most cases it would be wise to stop the app, use docker-sync clean and re-sync everything, otherwise you could face some problems • Sometimes, docker-sync may freeze or stop. It can be very frustrating if you don’t figure it out quickly. • Because it’s a Mac workaround, it may be wise to have separate docker-compose-osx.yml and keeping the original docker-compose.yml as clean as possible, especially if your team, like ours, works with both Mac and Linux. • Full re-sync can take more than 5 minutes on big PHP projects It wasn’t confortable for our developers, and even became more an more frustrating. Finally Docker-for-mac released a new version with the:cached option on mounted volumes in order to adresse the issue #77. They also planned to release:delegated (see and ). It was a really good update, but applications like Magento or Symfony are writing intensively in some directories (for cache or generated code) and this wasn’t really efficient.
Thanks to we figured out the trick to mount docker volumes on the directories where the application is writing intensively. Docker volumes have native linux performances on writing which implies that our apps reached very good performances with this configuration. We ended up with a docker-compose-osx.yml file written to override default config. Example for a Magento 2: Our developers are now happy again ?. To be fair, not completely happy.
Because they are annoyed by another famous “Docker for Mac” issue:. The Docker VM image file ( ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/Docker.qcow2 ) grows continuously and can reach up to 60Gb of disk space! When running out of disk space, because of the size of the Docker.qcow2 file, the only reliable solution is to delete this file and start with an empty VM image (stop Docker for Mac, delete the file, then restart Docker for Mac). The drawback is that you loose all your docker images (and your docker volumes), and have to download or create them again.
![Docker For Mac Include Compose Docker For Mac Include Compose](https://static1.squarespace.com/static/5a20387690bccee5e702f9c7/5a203c6c9140b733ae1d4f36/5a52e80271c10b6703dfc384/1542825279439/victoire-joncheray-361064-unsplash.jpg?format=2500w)
Docker for Mac released a new VM format: raw. Does it suffer from the same space problem? We haven’t tested it entierly right now, and in its lastest version, Docker rolled back the raw format to qcow2 because of some instabilities.
此内容还未提供中文版,以下为英文版 Get started with Docker for Mac 预计阅读时间: 15 分钟 Welcome to Docker for Mac! Docker is a full development platform for creating containerized apps, and Docker for Mac is the best way to get started with Docker on a Mac. Got Docker for Mac? If you have not yet installed Docker for Mac, please see for an explanation of stable and edge channels, system requirements, and download/install information. Looking for system requirements? Check out, which has moved to the new install topic. Check versions of Docker Engine, Compose, and Machine Run these commands to test if your versions of docker, docker-compose, and docker-machine are up-to-date and compatible with Docker.app.