Docker – build

Docker build command Docker build command is used to build an image from a Dockerfile. For more details visit our Dockerfile and Dockerfile directives tutorial. Syntax docker build [OPTIONS] [Dockerfile PATH|URL] Example Let’s create an example Dockerfile in your current directory. vim Dockerfile and add the following content.

Now build the image using single dot “.”, as Dockerfile is available in the current directory. Also, use -t image_name to specify tag name to the image. docker build -t apache_ubuntu . The build command will pull the image “tecadmin/ubuntu-ssh:16.04” from…

Read More

Docker – Images

Docker Images A Docker image is an inert, immutable, file that’s essentially a snapshot of a container. The images can be created with the build command, which can be used to create a container when started with run. List Docker Images Use docker images command to list all images available on your local system. $ docker images Search Docker Images Use docker search command to search images on docker hub. For example use following command to search available docker images for CentOS operating system. $ docker search centos Download Docker…

Read More