{"id":14578,"date":"2020-01-06T12:03:22","date_gmt":"2020-01-06T12:03:22","guid":{"rendered":"https:\/\/dbtut.com\/?p=14578"},"modified":"2020-01-06T12:03:24","modified_gmt":"2020-01-06T12:03:24","slug":"what-is-docker-docker-installation-and-usage","status":"publish","type":"post","link":"https:\/\/dbtut.com\/index.php\/2020\/01\/06\/what-is-docker-docker-installation-and-usage\/","title":{"rendered":"What is Docker? Docker Installation and Usage"},"content":{"rendered":"<p>This article contains information about what docker is and how to install and use it.<\/p>\n<h3>What is Docker?<\/h3>\n<p>It is a program that allows the creation of containers to sharing the resources of the operating system efficiently.<\/p>\n<h3>What is Container?<\/h3>\n<p>The Container is basically a structure that allows the efficient use of operating system resources.<\/p>\n<p>Processors and ram in computers are not always fully utilized by the operating system.<\/p>\n<p>Since resources are not fully used, computer resources are divided so that they can be used efficiently by different programs.<\/p>\n<p>For this purpose, various virtualization software such as VMWare and Virtualbox are used.<\/p>\n<p>Virtualization software needs to install new operating system while sharing resources.<\/p>\n<p>A new operating system may cause unnecessary use of resources that applications do not need.<\/p>\n<p>For example; An application used to store user information may not use screen resources.<\/p>\n<p>However, since operating system programs require a video card, video card resources that are not required for the application are also used.<\/p>\n<p>The new operating system for virtualization must be rebooted and installed.<\/p>\n<p>In the container structure, the resources needed by the application are shared softwareatically and unnecessary resource usage resulting from virtualization is prevented.<\/p>\n<p>Because the existing operating system resources are divided in the container structure, applications can be run quickly.<\/p>\n<p>In addition, the working environment required for the application can be prepared with the image in the container structure to ensure that the application is portable.<\/p>\n<h3>Docker Installation<\/h3>\n<p>The files required for installation are downloaded from docker.com and installed according to the operating system. Installation is done like an application installation on the operating system.<\/p>\n<h3>Docker Usage<\/h3>\n<p>The installation is checked by typing the following commands into the operating system command prompt(CMD, Powershell, Bash, etc.).<\/p>\n<pre class=\"lang:default decode:true \">docker version<\/pre>\n<p>The following command is used for detailed information about image, container and container count in the system.<\/p>\n<pre class=\"lang:default decode:true \">docker info<\/pre>\n<h3>Create Container From Image<\/h3>\n<p>The following command can be used for sample container usage.<\/p>\n<pre class=\"lang:default decode:true \">docker run hello-world<\/pre>\n<p>The command will create a container using the hello-world image. Before using Docker, it is useful to know how Docker works. Docker needs files called images to create containers.<\/p>\n<h4>What is Docker Image?<\/h4>\n<p>The image basically contains the files and settings that will be executed when the container is started or after it is started.<\/p>\n<p>Docker creates and runs containers using the commands in the image. In the example of hello-world above, first the hello-world image is searched on the computer, if it is not found, it is downloaded from &#8220;hub.docker.com&#8221; and a container is created.<\/p>\n<p>Once the container is created, the commands are executed using the Dockerfile settings in the image. A new image can be created when working with Docker. However, it will be useful to use the images at hub.docker.com before creating an image.<\/p>\n<h3>Search Docker Images in hub.docker.com<\/h3>\n<p>The search command is used to search for images.<\/p>\n<pre class=\"lang:default decode:true \">docker search hello-world<\/pre>\n<h3>Download Docker Images<\/h3>\n<p>The pull command is used to download images.<\/p>\n<pre class=\"lang:default decode:true \">docker pull hello-world<\/pre>\n<h3>List Docker Images<\/h3>\n<p>The images command is used to list images.<\/p>\n<pre class=\"lang:default decode:true \">docker images<\/pre>\n<h3>Delete Docker Images<\/h3>\n<p>The rmi command is used to delete the image.<\/p>\n<pre class=\"lang:default decode:true \">docker rmi hello-world<\/pre>\n<h3>Docker Image History<\/h3>\n<p>The history command is used for image history.<\/p>\n<pre class=\"lang:default decode:true \">docker history hello-world<\/pre>\n<h3>Run Docker Images<\/h3>\n<p>The run command is used to run the image.<\/p>\n<pre class=\"lang:default decode:true \">docker run hello-world<\/pre>\n<p><strong>NOTE:<\/strong> Images not listed are downloaded from hub.docker.com.<\/p>\n<p>There are different uses of image running according to the image content.<\/p>\n<p>The -name parameter is used to run the image with a custom name.<\/p>\n<pre class=\"lang:default decode:true \">docker run --name my-image hello-world<\/pre>\n<p>The -it parameter is used to run the image interactively.<\/p>\n<pre class=\"lang:default decode:true \">docker run -it centos \/bin\/bash<\/pre>\n<p>The -d parameter is used to run the image in the background.<\/p>\n<pre class=\"lang:default decode:true \">docker run -d hello-world<\/pre>\n<p>The -p parameter is used to export the image port.<\/p>\n<pre class=\"lang:default decode:true \">docker run -it -p 1453:80 nginx<\/pre>\n<p>From the browser, enter localhost:1453.<\/p>\n<p><strong>NOTE:<\/strong> We have accessed port 80 that the image uses, through the 1453.<\/p>\n<p>In order for the application or other files to be used by the image, it must be passed to the image with the volume property.<\/p>\n<p>The -v parameter is used to passing files to image.<\/p>\n<pre class=\"lang:default decode:true \">docker run -v \"File-directory-path\":\/usr\/share\/nginx\/html:ro -it -p 1453:80 nginx<\/pre>\n<p>Various operating system commands can be used to pass the current directory to image.<\/p>\n<pre class=\"lang:default decode:true \">docker run -v %cd%:\/usr\/share\/nginx\/html:ro -it -p 1453:80 nginx<\/pre>\n<pre class=\"lang:default decode:true \">docker run -v $(pwd):\/usr\/share\/nginx\/html:ro -it -p 1453:80 nginx<\/pre>\n<p><strong>NOTE:<\/strong> The directory path indication differs depending on the operating system.<\/p>\n<h3>List Running Containers<\/h3>\n<p>The ps command is used to list the running containers.<\/p>\n<pre class=\"lang:default decode:true \">docker ps<\/pre>\n<h3>List All Containers<\/h3>\n<p>The ps -a command is used to list the running containers.<\/p>\n<pre class=\"lang:default decode:true \">docker ps -a<\/pre>\n<p>The top command is used for container operations.<\/p>\n<pre class=\"lang:default decode:true\">docker top container-id<\/pre>\n<h3>Difference between docker kill and stop<\/h3>\n<p>You can learn the difference between stop and kill commad below.<\/p>\n<h3>Stop Running Container<\/h3>\n<p>The stop command is used to stop the running container.<\/p>\n<pre class=\"lang:default decode:true\">docker stop container-id<\/pre>\n<h3>Force Stop Running Container<\/h3>\n<p>The kill command is used to force stop the running container.<\/p>\n<pre class=\"lang:default decode:true\">docker kill container-id<\/pre>\n<h3>Start Stopped Container<\/h3>\n<p>The start command is used to run the stopped container.<\/p>\n<pre class=\"lang:default decode:true\">docker start container-id<\/pre>\n<h3>Which Docker command lets us attach to a running container?<\/h3>\n<p>The attach command is used to make the running container interactive.<\/p>\n<pre class=\"lang:default decode:true\">docker attach container-id<\/pre>\n<h3>Run Container Interactively<\/h3>\n<p>The ai parameter is used to interactively run the stopped container.<\/p>\n<pre class=\"lang:default decode:true\">docker start -ai container-id<\/pre>\n<h3>Get Information About Docker Container<\/h3>\n<p>The inspect command is used to get information about the container.<\/p>\n<pre class=\"lang:default decode:true\">docker inspect container-id<\/pre>\n<h3>Check Docker Resource Usage<\/h3>\n<p>The stats command is used for resource usage information of the running container.<\/p>\n<pre class=\"lang:default decode:true\">docker stats container-id<\/pre>\n<h3>Docker Log Information<\/h3>\n<p>The logs command is used for the log information of the container.<\/p>\n<pre class=\"lang:default decode:true\">docker logs container-id<\/pre>\n<h3>Remove Docker Container<\/h3>\n<p>The rm command is used to remove docker container.<\/p>\n<pre class=\"lang:default decode:true\">docker rm container-id<\/pre>\n<p>The &#8211;rm parameter is used to automatically delete the container after completing its operation.<\/p>\n<pre class=\"lang:default decode:true \">docker run --rm hello-world<\/pre>\n<h3>Remove All Docker Containers<\/h3>\n<p>The below commands can be used to remove all docker containers.<\/p>\n<pre class=\"lang:default decode:true \">docker rm $(docker ps -aq)<\/pre>\n<pre class=\"lang:default decode:true \">docker sytem prune<\/pre>\n<p><strong>NOTE:<\/strong> To remove the running container, it must first be stopped.<\/p>\n<p><strong>NOTE:<\/strong> There are multiple commands in the Docker that perform an operation.<\/p>\n<h2>Dockerfile<\/h2>\n<h3>What is a Dockerfile?<\/h3>\n<p>The Dockerfile file is used to create a custom image. The file contains various instructions on how to create a container.<\/p>\n<p>FROM-&gt; Refers to the image to be used.<br \/>\nLABEL-&gt; Refers to the image label.<br \/>\nRUN-&gt; Refers to the commands to be executed. (used for required installations.)<br \/>\nCMD-&gt; Refers to the commands to be executed. (Used for commands to be executed after necessary installations are made.)<br \/>\nENTRYPOINT-&gt; Refers to the path of the commands to be executed.<br \/>\nCOPY-&gt; Specifies the files to be copied to the image.<br \/>\nWORKDIR-&gt; Refers to the working directory.<br \/>\nENV-&gt; Refers to theenvironment variables.<br \/>\nEXPOSE-&gt; Refers to the image port number.<br \/>\nVOLUME-&gt; Refers to the files to be passed to the image.<\/p>\n<p>The build command is used to create images with Dockerfile.<\/p>\n<pre class=\"lang:default decode:true \">docker build -t image-name:version -f Dockerfile-File<\/pre>\n<p>If the dockerfile is in the same folder, just use a dot(.).<\/p>\n<pre class=\"lang:default decode:true \">docker build -t image-name:version .<\/pre>\n<h3>Create a Dockerfile<\/h3>\n<p>Create the following file as Dockerfile.<\/p>\n<pre class=\"lang:default decode:true \">FROM centos\nLABEL Vendor=\"SEZER\" License=MIT Version=0.1\n\nCMD [\"echo\", \"Image created.\"]<\/pre>\n<p>Create the image with the command below.<\/p>\n<pre class=\"lang:default decode:true\">docker build -t image:0.1 .<\/pre>\n<p>List images;<\/p>\n<pre class=\"lang:default decode:true \">docker images<\/pre>\n<p>Run the images by taking the ID of the image.<\/p>\n<pre class=\"lang:default decode:true\">docker run image-id<\/pre>\n<p>You will see &#8220;Image created.&#8221; on the screen. Similarly, you can create images according to your wishes. Here is an example Dockerfile file that runs Java commands.<\/p>\n<pre class=\"lang:default decode:true \">FROM java:8\nCOPY . \/var\/www\/java\nWORKDIR \/var\/www\/java\nRUN javac file.java\nCMD [\"java\", \"file\"]<\/pre>\n<p><strong>NOTE:<\/strong> You can create images according to your need by using the instructions above.<\/p>\n<h2>Docker Compose<\/h2>\n<h3>What is a docker compose?<\/h3>\n<p>An application developed can use multiple services.<\/p>\n<p>For example, an application developed using a programming language such as Node.js, PHP, C # or Java may require a database such as MySQL, SQL Server, or MongoDB.<\/p>\n<p>According to the application, services such as &#8220;log, http server&#8221; can be used.<\/p>\n<p>In this case, instead of gathering all the services under one image, it would be beneficial to use all the services under a different image.<\/p>\n<p>It will be difficult to create and manage each image separately.<\/p>\n<p>The application running in one image may depend on the image contained within another image.<\/p>\n<p>In this case, multiple images can be managed with Docker compose.<\/p>\n<p>Docker compose stores the settings in the docker-compose.yml file.<\/p>\n<pre class=\"lang:default decode:true \">version: \"3\"\n\nservices:\n    mysql:\n        image: mysql\n        ports: \n            - \"3306:3306\"\n        environment:\n            MYSQL_DATABASE: database\n            MYSQL_USER: user_name\n            MYSQL_PASSWORD: user_password\n            MYSQL_ROOT_PASSWORD: root_password\n    php:\n        build: \n            context: .\/php\/\n        ports: \n            - \"8001:80\"\n        volumes:\n            - .\/www:\/var\/www\/html\/\n        depends_on:\n            - mysql<\/pre>\n<p>In the example above, mysql service port and environment variables are set.<\/p>\n<p>In php service;<\/p>\n<p>The Dockerfile file in the php folder was used.<\/p>\n<p>With volumes, the files to be used are determined.<\/p>\n<p>With depends_on, the image to which the image is depended is determined.<\/p>\n<p>As these settings will vary according to the structure to be used, it will be useful to prepare the appropriate structure according to the need.<br \/>\nHave a good day.<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_14578\" class=\"pvc_stats all  \" data-element-id=\"14578\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/dbtut.com\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>This article contains information about what docker is and how to install and use it. What is Docker? It is a program that allows the creation of containers to sharing the resources of the operating system efficiently. What is Container? The Container is basically a structure that allows the efficient use of operating system resources. &hellip;<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_14578\" class=\"pvc_stats all  \" data-element-id=\"14578\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/dbtut.com\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"author":485,"featured_media":14580,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[7447],"tags":[7335,2540,7441,7341,7344,7435,7436,7439,7440,7438,7425,7426,7349,7390,7416,7412,7429,7389,7434,7392,7379,7408,7437,7427,7428,7417,7414,7351,7369,7347,7342,7338,7394,7395,7391,7375,7378,7419,7371,7374,7407,7360,7368,7370,7353,7367,7352,7365,7366,7357,7413,7361,7405,7362,7364,7393,7401,7373,7387,7388,7340,7336,7418,7415,7343,7406,7377,7432,7396,7382,7383,7409,7442,7337,7363,2537,7332,7333,7331,7381,7380,7372,7358,7359,7334,7420,7422,7421,7424,7423,7410,7411,7354,7355,7404,7376,7356,7350,7348,7403,7400,7385,7386,7445,7446,7430,7339,7443,2542,7433,7345,7346,7397,7384,7399,7398,7444,7431,7402],"class_list":["post-14578","post","type-post","status-publish","format-standard","has-post-thumbnail","","category-docker","tag-check-docker-version","tag-check-the-docker-versions-in-the-repo","tag-command-to-create-image-from-dockerfile","tag-container-count-in-docker","tag-create-container-from-image","tag-create-custom-docker-image","tag-create-custom-image-docker","tag-create-image-dockerfile","tag-create-image-from-dockerfile","tag-create-image-using-dockerfile","tag-delete-all-containers","tag-delete-all-containers-docker","tag-delete-docker-images","tag-difference-between-docker-kill-and-stop","tag-docker-check-container-resource-usage","tag-docker-check-resource-usage","tag-docker-clear-all-containers","tag-docker-command-to-stop-running-container","tag-docker-compose","tag-docker-container-force-kill","tag-docker-container-list","tag-docker-container-resource-usage","tag-docker-create-image-from-scratch","tag-docker-delete-all-containers","tag-docker-deleting-all-containers","tag-docker-get-container-resource-usage","tag-docker-get-resource-usage","tag-docker-image-history","tag-docker-image-run-port","tag-docker-images","tag-docker-info","tag-docker-installation","tag-docker-kill-container","tag-docker-kill-containers","tag-docker-kill-vs-stop","tag-docker-list-containers","tag-docker-list-images","tag-docker-log-information","tag-docker-port-using","tag-docker-remove-container","tag-docker-resource-usage","tag-docker-run-container","tag-docker-run-d-parameter","tag-docker-run-example-with-port","tag-docker-run-methods","tag-docker-run-name-parameter","tag-docker-run-paramaters","tag-docker-run-parameters","tag-docker-run-silent","tag-docker-search-images-version","tag-docker-see-resource-usage","tag-docker-start-container","tag-docker-start-container-interactivel","tag-docker-start-container-with-different-command","tag-docker-start-parameters","tag-docker-start-stop-container","tag-docker-start-stopped-container","tag-docker-stop-container","tag-docker-stop-running-container","tag-docker-stop-running-containers","tag-docker-tutorial","tag-docker-usage","tag-docker-view-container-resource-usage","tag-docker-view-resource-usage","tag-get-information-about-docker","tag-get-information-about-docker-container","tag-get-list-of-running-containers-docker","tag-how-do-i-create-a-dockerfile","tag-how-do-i-kill-a-docker-container","tag-how-do-i-stop-docker","tag-how-do-you-stop-a-running-container","tag-how-to-check-docker-container-memory-usage","tag-how-to-create-dockerfile","tag-how-to-install-docker","tag-how-to-start-stopped-docker-container","tag-install-docker-in-centos","tag-install-oracle-docker","tag-install-oracle-docker-container","tag-install-oracle-docker-image","tag-list-all-containers","tag-list-all-containers-docker","tag-list-all-running-containers-docker","tag-list-running-containers","tag-list-running-containers-docker","tag-oracle-db-docker-image","tag-remove-all-docker-containers","tag-remove-all-docker-containers-at-once","tag-remove-all-docker-containers-command","tag-remove-all-exited-containers","tag-removing-all-docker-containers","tag-resource-usage-docker","tag-resource-usage-of-docker-container","tag-run-a-docker-image-in-the-background","tag-run-a-specif-docker-image","tag-run-container-interactively","tag-run-docker-image-in-background","tag-run-docker-image-interactively","tag-run-docker-images","tag-search-docker-images","tag-start-container-interactively","tag-start-stopped-container","tag-stop-running-container-docker","tag-stop-running-containers","tag-what-are-the-main-features-of-docker-compose","tag-what-is-a-docker-compose-file","tag-what-is-a-dockerfile","tag-what-is-container","tag-what-is-difference-between-dockerfile-and-docker-compose","tag-what-is-docker","tag-what-is-docker-file-and-how-it-works","tag-what-is-docker-image","tag-what-is-docker-images","tag-what-is-docker-kill","tag-what-is-docker-stop","tag-what-is-the-command-to-stop-a-container","tag-what-is-the-difference-between-kill-and-stop-in-docker","tag-what-is-the-purpose-of-docker-compose","tag-what-is-the-use-of-dockerfile","tag-which-docker-command-lets-us-attach-to-a-running-container"],"aioseo_notices":[],"a3_pvc":{"activated":true,"total_views":288,"today_views":0},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>What is Docker? Docker Installation and Usage - Database Tutorials<\/title>\n<meta name=\"description\" content=\"What is Docker? Docker Installation and Usage\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/dbtut.com\/index.php\/2020\/01\/06\/what-is-docker-docker-installation-and-usage\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"What is Docker? Docker Installation and Usage - Database Tutorials\" \/>\n<meta property=\"og:description\" content=\"What is Docker? Docker Installation and Usage\" \/>\n<meta property=\"og:url\" content=\"https:\/\/dbtut.com\/index.php\/2020\/01\/06\/what-is-docker-docker-installation-and-usage\/\" \/>\n<meta property=\"og:site_name\" content=\"Database Tutorials\" \/>\n<meta property=\"article:published_time\" content=\"2020-01-06T12:03:22+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-01-06T12:03:24+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/01\/Ads\u0131z-2.png\" \/>\n\t<meta property=\"og:image:width\" content=\"522\" \/>\n\t<meta property=\"og:image:height\" content=\"346\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Yusuf SEZER\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Yusuf SEZER\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2020\/01\/06\/what-is-docker-docker-installation-and-usage\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2020\/01\/06\/what-is-docker-docker-installation-and-usage\/\"},\"author\":{\"name\":\"Yusuf SEZER\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/person\/be8bf54494b6a89e626cbed2c940599a\"},\"headline\":\"What is Docker? Docker Installation and Usage\",\"datePublished\":\"2020-01-06T12:03:22+00:00\",\"dateModified\":\"2020-01-06T12:03:24+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2020\/01\/06\/what-is-docker-docker-installation-and-usage\/\"},\"wordCount\":1350,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/dbtut.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2020\/01\/06\/what-is-docker-docker-installation-and-usage\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/01\/Ads\u0131z-2.png\",\"keywords\":[\"check docker version\",\"check the docker versions in the repo\",\"command to create image from dockerfile\",\"container count in docker\",\"create container from image\",\"create custom docker image\",\"create custom image docker\",\"create image dockerfile\",\"create image from dockerfile\",\"create image using dockerfile\",\"delete all containers\",\"delete all containers docker\",\"Delete Docker Images\",\"difference between docker kill and stop\",\"docker check container resource usage\",\"docker check resource usage\",\"docker clear all containers\",\"docker command to stop running container\",\"Docker Compose\",\"docker container force kill\",\"docker container list\",\"docker container resource usage\",\"docker create image from scratch\",\"docker delete all containers\",\"docker deleting all containers\",\"docker get container resource usage\",\"docker get resource usage\",\"Docker Image History\",\"docker image run port\",\"docker images\",\"docker info\",\"docker installation\",\"docker kill container\",\"docker kill containers\",\"docker kill vs stop\",\"docker list containers\",\"docker list images\",\"docker log information\",\"docker port using\",\"docker remove container\",\"docker resource usage\",\"docker run container\",\"docker run d parameter\",\"docker run example with port\",\"docker run methods\",\"docker run name parameter\",\"docker run paramaters\",\"docker run parameters\",\"docker run silent\",\"docker search images version\",\"docker see resource usage\",\"docker start container\",\"docker start container interactivel\",\"docker start container with different command\",\"docker start parameters\",\"docker start stop container\",\"Docker Start Stopped Container\",\"docker stop container\",\"docker stop running container\",\"docker stop running containers\",\"docker tutorial\",\"docker usage\",\"docker view container resource usage\",\"docker view resource usage\",\"get information about docker\",\"get information about docker container\",\"get list of running containers docker\",\"How do I create a Dockerfile?\",\"How do I kill a docker container?\",\"How do I stop Docker?\",\"How do you stop a running container?\",\"how to check docker container memory usage\",\"how to create dockerfile\",\"how to install docker\",\"how to start stopped docker container\",\"Install docker in centos\",\"install oracle docker\",\"install oracle docker container\",\"install oracle docker image\",\"list all containers\",\"list all containers docker\",\"list all running containers docker\",\"list running containers\",\"list running containers docker\",\"oracle db docker image\",\"remove all docker containers\",\"remove all docker containers at once\",\"remove all docker containers command\",\"remove all exited containers\",\"removing all docker containers\",\"resource usage docker\",\"resource usage of docker container\",\"run a docker image in the background\",\"run a specif docker image\",\"Run Container Interactively\",\"run docker image in background\",\"run docker image interactively\",\"Run Docker Images\",\"Search Docker Images\",\"Start Container Interactively\",\"Start Stopped Container\",\"stop running container docker\",\"stop running containers\",\"What are the main features of Docker compose?\",\"What is a docker compose file?\",\"What is a Dockerfile?\",\"what is container\",\"What is difference between Dockerfile and Docker compose?\",\"What is Docker\",\"What is Docker file and how it works?\",\"what is docker image\",\"what is docker images\",\"What is Docker kill?\",\"What is Docker stop?\",\"What is the command to stop a container?\",\"What is the difference between kill and stop in Docker?\",\"What is the purpose of Docker compose?\",\"What is the use of Dockerfile?\",\"Which Docker command lets us attach to a running container?\"],\"articleSection\":[\"Docker\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/dbtut.com\/index.php\/2020\/01\/06\/what-is-docker-docker-installation-and-usage\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2020\/01\/06\/what-is-docker-docker-installation-and-usage\/\",\"url\":\"https:\/\/dbtut.com\/index.php\/2020\/01\/06\/what-is-docker-docker-installation-and-usage\/\",\"name\":\"What is Docker? Docker Installation and Usage - Database Tutorials\",\"isPartOf\":{\"@id\":\"https:\/\/dbtut.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2020\/01\/06\/what-is-docker-docker-installation-and-usage\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2020\/01\/06\/what-is-docker-docker-installation-and-usage\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/01\/Ads\u0131z-2.png\",\"datePublished\":\"2020-01-06T12:03:22+00:00\",\"dateModified\":\"2020-01-06T12:03:24+00:00\",\"description\":\"What is Docker? Docker Installation and Usage\",\"breadcrumb\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2020\/01\/06\/what-is-docker-docker-installation-and-usage\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/dbtut.com\/index.php\/2020\/01\/06\/what-is-docker-docker-installation-and-usage\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2020\/01\/06\/what-is-docker-docker-installation-and-usage\/#primaryimage\",\"url\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/01\/Ads\u0131z-2.png\",\"contentUrl\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/01\/Ads\u0131z-2.png\",\"width\":522,\"height\":346},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2020\/01\/06\/what-is-docker-docker-installation-and-usage\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/dbtut.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"What is Docker? Docker Installation and Usage\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/dbtut.com\/#website\",\"url\":\"https:\/\/dbtut.com\/\",\"name\":\"Database Tutorials\",\"description\":\"MSSQL, Oracle, PostgreSQL, MySQL, MariaDB, DB2, Sybase, Teradata, Big Data, NOSQL, MongoDB, Couchbase, Cassandra, Windows, Linux\",\"publisher\":{\"@id\":\"https:\/\/dbtut.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/dbtut.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/dbtut.com\/#organization\",\"name\":\"dbtut\",\"url\":\"https:\/\/dbtut.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg\",\"contentUrl\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg\",\"width\":223,\"height\":36,\"caption\":\"dbtut\"},\"image\":{\"@id\":\"https:\/\/dbtut.com\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/person\/be8bf54494b6a89e626cbed2c940599a\",\"name\":\"Yusuf SEZER\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/19675b3db2d4ce370af047187123e2055a2b254ede3f0e7d9bc934da478146f7?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/19675b3db2d4ce370af047187123e2055a2b254ede3f0e7d9bc934da478146f7?s=96&d=mm&r=g\",\"caption\":\"Yusuf SEZER\"},\"url\":\"https:\/\/dbtut.com\/index.php\/author\/yusufsezer\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"What is Docker? Docker Installation and Usage - Database Tutorials","description":"What is Docker? Docker Installation and Usage","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/dbtut.com\/index.php\/2020\/01\/06\/what-is-docker-docker-installation-and-usage\/","og_locale":"en_US","og_type":"article","og_title":"What is Docker? Docker Installation and Usage - Database Tutorials","og_description":"What is Docker? Docker Installation and Usage","og_url":"https:\/\/dbtut.com\/index.php\/2020\/01\/06\/what-is-docker-docker-installation-and-usage\/","og_site_name":"Database Tutorials","article_published_time":"2020-01-06T12:03:22+00:00","article_modified_time":"2020-01-06T12:03:24+00:00","og_image":[{"width":522,"height":346,"url":"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/01\/Ads\u0131z-2.png","type":"image\/png"}],"author":"Yusuf SEZER","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Yusuf SEZER","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/dbtut.com\/index.php\/2020\/01\/06\/what-is-docker-docker-installation-and-usage\/#article","isPartOf":{"@id":"https:\/\/dbtut.com\/index.php\/2020\/01\/06\/what-is-docker-docker-installation-and-usage\/"},"author":{"name":"Yusuf SEZER","@id":"https:\/\/dbtut.com\/#\/schema\/person\/be8bf54494b6a89e626cbed2c940599a"},"headline":"What is Docker? Docker Installation and Usage","datePublished":"2020-01-06T12:03:22+00:00","dateModified":"2020-01-06T12:03:24+00:00","mainEntityOfPage":{"@id":"https:\/\/dbtut.com\/index.php\/2020\/01\/06\/what-is-docker-docker-installation-and-usage\/"},"wordCount":1350,"commentCount":0,"publisher":{"@id":"https:\/\/dbtut.com\/#organization"},"image":{"@id":"https:\/\/dbtut.com\/index.php\/2020\/01\/06\/what-is-docker-docker-installation-and-usage\/#primaryimage"},"thumbnailUrl":"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/01\/Ads\u0131z-2.png","keywords":["check docker version","check the docker versions in the repo","command to create image from dockerfile","container count in docker","create container from image","create custom docker image","create custom image docker","create image dockerfile","create image from dockerfile","create image using dockerfile","delete all containers","delete all containers docker","Delete Docker Images","difference between docker kill and stop","docker check container resource usage","docker check resource usage","docker clear all containers","docker command to stop running container","Docker Compose","docker container force kill","docker container list","docker container resource usage","docker create image from scratch","docker delete all containers","docker deleting all containers","docker get container resource usage","docker get resource usage","Docker Image History","docker image run port","docker images","docker info","docker installation","docker kill container","docker kill containers","docker kill vs stop","docker list containers","docker list images","docker log information","docker port using","docker remove container","docker resource usage","docker run container","docker run d parameter","docker run example with port","docker run methods","docker run name parameter","docker run paramaters","docker run parameters","docker run silent","docker search images version","docker see resource usage","docker start container","docker start container interactivel","docker start container with different command","docker start parameters","docker start stop container","Docker Start Stopped Container","docker stop container","docker stop running container","docker stop running containers","docker tutorial","docker usage","docker view container resource usage","docker view resource usage","get information about docker","get information about docker container","get list of running containers docker","How do I create a Dockerfile?","How do I kill a docker container?","How do I stop Docker?","How do you stop a running container?","how to check docker container memory usage","how to create dockerfile","how to install docker","how to start stopped docker container","Install docker in centos","install oracle docker","install oracle docker container","install oracle docker image","list all containers","list all containers docker","list all running containers docker","list running containers","list running containers docker","oracle db docker image","remove all docker containers","remove all docker containers at once","remove all docker containers command","remove all exited containers","removing all docker containers","resource usage docker","resource usage of docker container","run a docker image in the background","run a specif docker image","Run Container Interactively","run docker image in background","run docker image interactively","Run Docker Images","Search Docker Images","Start Container Interactively","Start Stopped Container","stop running container docker","stop running containers","What are the main features of Docker compose?","What is a docker compose file?","What is a Dockerfile?","what is container","What is difference between Dockerfile and Docker compose?","What is Docker","What is Docker file and how it works?","what is docker image","what is docker images","What is Docker kill?","What is Docker stop?","What is the command to stop a container?","What is the difference between kill and stop in Docker?","What is the purpose of Docker compose?","What is the use of Dockerfile?","Which Docker command lets us attach to a running container?"],"articleSection":["Docker"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/dbtut.com\/index.php\/2020\/01\/06\/what-is-docker-docker-installation-and-usage\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/dbtut.com\/index.php\/2020\/01\/06\/what-is-docker-docker-installation-and-usage\/","url":"https:\/\/dbtut.com\/index.php\/2020\/01\/06\/what-is-docker-docker-installation-and-usage\/","name":"What is Docker? Docker Installation and Usage - Database Tutorials","isPartOf":{"@id":"https:\/\/dbtut.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/dbtut.com\/index.php\/2020\/01\/06\/what-is-docker-docker-installation-and-usage\/#primaryimage"},"image":{"@id":"https:\/\/dbtut.com\/index.php\/2020\/01\/06\/what-is-docker-docker-installation-and-usage\/#primaryimage"},"thumbnailUrl":"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/01\/Ads\u0131z-2.png","datePublished":"2020-01-06T12:03:22+00:00","dateModified":"2020-01-06T12:03:24+00:00","description":"What is Docker? Docker Installation and Usage","breadcrumb":{"@id":"https:\/\/dbtut.com\/index.php\/2020\/01\/06\/what-is-docker-docker-installation-and-usage\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/dbtut.com\/index.php\/2020\/01\/06\/what-is-docker-docker-installation-and-usage\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/dbtut.com\/index.php\/2020\/01\/06\/what-is-docker-docker-installation-and-usage\/#primaryimage","url":"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/01\/Ads\u0131z-2.png","contentUrl":"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/01\/Ads\u0131z-2.png","width":522,"height":346},{"@type":"BreadcrumbList","@id":"https:\/\/dbtut.com\/index.php\/2020\/01\/06\/what-is-docker-docker-installation-and-usage\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/dbtut.com\/"},{"@type":"ListItem","position":2,"name":"What is Docker? Docker Installation and Usage"}]},{"@type":"WebSite","@id":"https:\/\/dbtut.com\/#website","url":"https:\/\/dbtut.com\/","name":"Database Tutorials","description":"MSSQL, Oracle, PostgreSQL, MySQL, MariaDB, DB2, Sybase, Teradata, Big Data, NOSQL, MongoDB, Couchbase, Cassandra, Windows, Linux","publisher":{"@id":"https:\/\/dbtut.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/dbtut.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/dbtut.com\/#organization","name":"dbtut","url":"https:\/\/dbtut.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/dbtut.com\/#\/schema\/logo\/image\/","url":"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg","contentUrl":"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg","width":223,"height":36,"caption":"dbtut"},"image":{"@id":"https:\/\/dbtut.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/dbtut.com\/#\/schema\/person\/be8bf54494b6a89e626cbed2c940599a","name":"Yusuf SEZER","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/dbtut.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/19675b3db2d4ce370af047187123e2055a2b254ede3f0e7d9bc934da478146f7?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/19675b3db2d4ce370af047187123e2055a2b254ede3f0e7d9bc934da478146f7?s=96&d=mm&r=g","caption":"Yusuf SEZER"},"url":"https:\/\/dbtut.com\/index.php\/author\/yusufsezer\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/posts\/14578","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/users\/485"}],"replies":[{"embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/comments?post=14578"}],"version-history":[{"count":0,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/posts\/14578\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/media\/14580"}],"wp:attachment":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/media?parent=14578"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/categories?post=14578"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/tags?post=14578"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}