|
| 1 | +--- |
| 2 | +title : Install Docker on MacOS |
| 3 | +sidebar_label : Install on MacOS |
| 4 | +--- |
| 5 | + |
| 6 | +# Install Docker on MacOS |
| 7 | + |
| 8 | +<SubHeading>Learn how to install and use Docker on MacOS.</SubHeading> |
| 9 | + |
| 10 | +**Installing [Docker](https://www.docker.com/) on MacOS** involves a few steps, but it's relatively straightforward. |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | +> Here are the **steps to install Docker on MacOS**: |
| 15 | +
|
| 16 | +## ✅ **Prerequisites** |
| 17 | + |
| 18 | +- Make sure you have a macOS version that supports Docker Desktop. Check the Docker documentation for the latest macOS requirements. |
| 19 | +- You need a Docker Hub account. You can sign up for one at [Docker Hub](https://hub.docker.com/). |
| 20 | + |
| 21 | +## ✅ **Download Docker Desktop** |
| 22 | + |
| 23 | +- Go to the Docker Desktop for Mac download page: [Docker Desktop for Mac](https://www.docker.com/products/docker-desktop) |
| 24 | +- Click the "Download for Mac" button to start the download. |
| 25 | + |
| 26 | +## ✅ **Install Docker Desktop** |
| 27 | + |
| 28 | +- Once the download is complete, open the .dmg file. |
| 29 | +- Drag the Docker icon to your Applications folder. |
| 30 | +- Start Docker Desktop from your Applications folder. |
| 31 | + |
| 32 | +## ✅ **Configure Docker Desktop** |
| 33 | + |
| 34 | +- After starting Docker Desktop, you'll see the Docker whale icon in your macOS menu bar. Click on it. |
| 35 | +- Sign in with your Docker Hub account credentials. |
| 36 | + |
| 37 | +## ✅ **Enable Kubernetes (Optional)** |
| 38 | + |
| 39 | +- If you plan to work with Kubernetes alongside Docker, you can enable it from the Docker Desktop settings. |
| 40 | + |
| 41 | +## ✅ **Test Your Installation** |
| 42 | + |
| 43 | +- Open a terminal (you can use Terminal.app or an alternative like iTerm). |
| 44 | +- Run a simple Docker command to verify the installation. For example, you can run: |
| 45 | +```sh |
| 46 | +docker --version |
| 47 | +``` |
| 48 | + |
| 49 | +This should display the Docker version installed. |
| 50 | + |
| 51 | +## ✅ **Run a Docker Container** |
| 52 | + |
| 53 | +- Test Docker by running a simple container. For example, you can run a basic Nginx web server container: |
| 54 | +```sh |
| 55 | +docker run -d -p 80:80 nginx |
| 56 | +``` |
| 57 | + |
| 58 | +This command starts an Nginx container in the background and maps port 80 from the container to port 80 on your macOS machine. |
| 59 | + |
| 60 | +## ✅ **Access the Container** |
| 61 | + |
| 62 | +- Open a web browser and navigate to http://localhost to see the default Nginx page. You should be able to access the web server running in your Docker container. |
| 63 | + |
| 64 | +## ✅ In Summary |
| 65 | + |
| 66 | +Explore Docker by running more containers and images. For example, you can try running a MySQL database, a WordPress site, or other applications from Docker Hub. |
| 67 | + |
| 68 | +Docker Hub provides various Docker images that you can use as samples for testing. |
| 69 | + |
| 70 | +That's it! You've **successfully installed Docker on your macOS machine using Docker Desktop**. |
| 71 | + |
| 72 | +You can now start experimenting with containers, building custom images, and using Docker for your development and testing needs. |
| 73 | + |
| 74 | +## ✅ Resources |
| 75 | + |
| 76 | +- 👉 Access [AppSeed](https://appseed.us/) for more starters and support |
| 77 | +- 👉 [Deploy Projects on Aws, Azure and DO](https://www.docs.deploypro.dev/) via **DeployPRO** |
| 78 | +- 👉 Create landing pages with [Simpllo, an open-source site builder](https://www.simpllo.com/) |
| 79 | +- 👉 Build apps with [Django App Generator](https://app-generator.dev/django/) (free service) |
0 commit comments