-
Notifications
You must be signed in to change notification settings - Fork 4
Docker for Mac
This is a step-by-step guide to installing and running Docker on your Mac so that you can develop applications locally.
- Pre-requisite
- Get started with Docker for Mac
The only pre-requisite for this guide is that you have Homebrew installed. Homebrew is a package manager for the Mac. You’ll also need Homebrew Cask, which you can install after Homebrew by running brew tap caskroom/cask
in your Terminal.
Docker for Mac is the current release of Docker for OSX. Requirements:
- Mac must be 2010 or new model with Intel's hardare support for memory management unit (MMU, virtualization, and Unrestricted mode.
- OSX El Capital 10.11 and newer releases are supported.
- Virtualbox prior to version 4.3.30 must NOT be installed. It is incompatiable. Use a newer version.
Docker for Mac can be downloaded here.
You can use Homebrew and Homebrew Cask to install Docker Toolbox
which is a collection of useful docker tools such as docker-compose
, docker-machine
and Kitematic
.
$ brew cask install docker # Install Docker
$ open /Applications/Docker.app # Start Docker
You can find more about docker follow the documentation here.
If everything works, you should have the following commands available:
$ docker info
Containers: 0
Running: 0
Paused: 0
...
$ docker-compose --version
docker-compose version 1.23.2, build 1110ad01
docker-machine --version
docker-machine version 0.16.1, build cce350d7
If you get an error like the one below, you might need to start the Docker daemon.
$ docker info
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
To start the Docker daemon, it probably needs one of these commands
open /Applications/Docker.app # macOS
sudo systemctl start docker # Arch, Ubuntu, CentOS
For Arch Linux, Ubuntu and CentOS, this will enable auto-starting of the Docker service:
sudo systemctl enable docker
For quick start find the Docker Quickstart Terminal and double click to launch it. Then you start the hello world container using:
$ docker run hello-world
- Home
- Docker Installation
-
Getting Started with Docker
- Containers
- Lifecycle
- Starting and Stopping
- Information on Docker Containers, Processes and Performance
- Import / Export (Backup / Restore)
- Executing Commands
- Images
- Lifecycle of Containers (Create, Run, Build, Commit)
- Info
- Cleaning up
- Images Created by Redirection
- Import/Export Container
- Private and Public Registries/Repositories
- Running a Local Registry
- Dockerfile
- Layers
- Links Between Containers
- Volumes
- Docker Volume Lifecycle
- Volume Information
- Exposing Ports
- Security Considerations
- Docker Compose
- Setup CI/CD pipeline with Docker
- Deployment - AWS Elastic Beanstalk
- Running Docker on AWS with Terraform
- Running Docker on AWS EC2
- Deploying AWS Elastic Beanstalk applications with Terraform
- Docker Example Project