Step 2: Customize and Push to Docker Hub
Docker For Mac 10.10.5
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.
Men's Dockers, Overton Never Wet Oxford. This classic oxford is the perfect weekend shoe! With water resistant leather uppers and a special Comfort Zone cushioned insole, you'll feel relaxed and comfortable. Water resistant leather uppers with NeverWet technology, a water and stain guard that instantly repels liquids Lace up closure for a secure fitFabric liningsCushioned footbed with Comfort. Oct 10 23:35:13 zmac.local Dockercom.docker.docker5494: Application version: 1.12.1 (12133) Oct 10 23:35:13 zmac.local Dockercom.docker.docker5494: Administrator user: true Oct 10 23:35:13 zmac.local Dockercom.docker.docker5494: OSX Version: Version 10.10.5 (Build 14F1912) Oct 10 23:35:14 zmac.local Dockercom.docker.docker5494: Docker does. 1,146 likes 19 talking about this. Dockers offers the best selection of casual shoe styles that include classic boat shoes, sandals, drivers, loafers and slip-ons. Mac OS X Yosemite 10.10.5 14F27 $ swvers ProductName: Mac OS X ProductVersion: 10.10.5 BuildVersion: 14F27 $ systemprofiler SPHardwareDataType Hardware: Hardware Overview: Model Name: MacBook Pro Model Identifier: MacBookPro11,3 Processor Name: Intel Core i7 Processor Speed: 2.3 GHz Number of Processors: 1 Total Number of Cores: 4 L2 Cache (per Core): 256 KB L3 Cache: 6 MB Memory: 16 GB Boot.
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:
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.
Finally push your image to Docker Hub:
You may be asked to login if you haven’t already. Then you can go to hub.docker.com, login and check your repositories
To clean up before moving to the next section, run
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.
Docker For Mac 10.10.5
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:
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.
Finally push your image to Docker Hub:
You may be asked to login if you haven’t already. Then you can go to hub.docker.com, login and check your repositories
To clean up before moving to the next section, run