![Shortcut Shortcut](/uploads/1/1/8/3/118302909/682865962.jpg)
Docker Desktop stores Linux containers and images in a single, large “disk image” file in the Mac filesystem. This is different from Docker on Linux, which usually stores containers and images in the /var/lib/docker directory. On my Mac with MacOS 10.14.6 Mojave, running Docker version 19.03.8 that single large file can be found at. Once you are on the downloads page, click on the blue button to the right which says “Get Docker” (highlighted in red in the screen shot below) to download the application. Open the downloaded file. Download links to old Docker for Mac versions View on GitHub Docker for Mac download links. Release versions can be correlated against the Official Release Notes. Note: Not all builds result in a release, so it’s recommended you pick the largest build number for the particular release you’re interested in. Stable 17.09.0-ce-mac35. Docker is available for Linux, MacOS, and Windows. Docker for Mac is best installed with Homebrew and Homebrew Cask. For other ways to install on MacOS, see Install Docker for Mac in Docker's docs.
Step 2: Customize and Push to Docker Hub
The last step used an official Docker image. Next step, create your own custom image. You should have a Docker ID, you probably created it to download Docker Desktop.
In your favorite text editor create a file called Dockerfile in the same directory you used in step 1. No extension, just Dockerfile. Paste in this code and save the file:
This tells Docker to use the same nginx base image, and create a layer that adds in the HTML you created in the last step. Instead of creating a volume that accesses the file directly from the host you are running on, it adds the file to the image. To build the image, in your terminal, type:
Two things, first replace <YourDockerID> with your Docker ID. Also notice the “.” at the end of the line. That tells Docker to build in the context of this directory. So when it looks to COPY the file to /usr/share/nginx/html it will use the file from this directory.
You can run it:
![Download Download](/uploads/1/1/8/3/118302909/388365542.png)
And go to http://localhost:8080 to see the page.
Next login to Docker Hub. You can do this directly from Docker Desktop. Or you can do it from the command line by typing.
Download Docker Machine For Windows
Finally push your image to Docker Hub:
Docker Download Windows
You may be asked to login if you haven’t already. Then you can go to hub.docker.com, login and check your repositories
Download Docker Mac Without Login
To clean up before moving to the next section, run