Getting ready

Before we begin, we need a Dockerfile with build instructions. To make one, we need to go through the following steps:

  1. Create an empty directory:
       $ mkdir sample_image
       $ cd sample_image
  
  1. Create a file named Dockerfile with the following content:
       $ cat Dockerfile
       # Use ubuntu as the base image 
       FROM ubuntu 
    
       # Add author's name 
       LABEL maintainer="Jeeva S. Chelladhurai" 
    
       # Add the command to run at the start of container 
       CMD date  
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.14.128.33