Video Lesson: Install Docker Desktop and configure preferences in Docker

Install Docker Desktop and configure preferences in Docker

Learn how to install Docker Desktop and configure its preferences for reliable containerized development.


Lesson Content

Before setting up Magento with Docker, install Docker Desktop on your computer. Search for Docker Desktop and download the installer for your operating system.

On macOS, choose the installer for either an Intel processor or an Apple processor. Installers are also available for Windows and Linux.

After installation, start Docker Desktop. You should see the Docker icon, which looks like a ship carrying containers, in your taskbar or menu bar. Open it and select Preferences.

You generally don’t need to change any settings under General. Open Resources to configure the settings that matter most for Magento.

Set the CPUs to approximately the middle of the available range. Docker Desktop often starts with a low CPU allocation, but Magento benefits from having more processors available.

Set the memory to at least 6 GB. Docker Magento requires this amount to run reliably. Using less than 6 GB can cause out-of-memory errors and other unexpected problems.

The memory value is the maximum amount of memory Docker can use; Docker doesn’t automatically consume all of it. Don’t allocate your entire system memory to Docker, or your computer may start swapping. A value around half of your available system memory is usually a reasonable choice. For example, on a computer with 16 GB of memory, you can allocate around 8 GB to Docker.

Set Swap to approximately the middle of its available range as well. The Disk image size controls the maximum amount of disk space Docker can use for Docker volumes, so increase it if your Magento projects require additional space.

Next, open File sharing. This section lists the directories that Docker is allowed to bind mount into containers.

On macOS, websites are commonly stored in a Sites directory under your home directory. Because your home directory is usually already shared, you don’t need to add anything in that case.

If you store website files in a non-standard location, add the parent directory to the file-sharing list. Docker won’t be able to access or mount files outside the shared directories.

You can also configure custom Docker Engine flags, but the default Docker Desktop settings generally work well, so leave these unchanged unless your setup requires otherwise.

Click Apply & Restart to save the preferences. Once Docker Desktop starts again, it’s ready for the Magento installation.

Maggie

Hey, I'm Maggie! 👋

Ask me anything.

Want to chat with Maggie?

Log in for AI tutor access.

Comments

Join the discussion!

Notes

Keep track of what you learn!