{"id":2114,"date":"2019-08-22T07:00:32","date_gmt":"2019-08-22T07:00:32","guid":{"rendered":"https:\/\/www.testpreptraining.com\/tutorial\/?page_id=2114"},"modified":"2020-05-02T07:31:16","modified_gmt":"2020-05-02T07:31:16","slug":"containers-and-docker","status":"publish","type":"page","link":"https:\/\/www.testpreptraining.ai\/tutorial\/aws-devops-engineer\/containers-and-docker\/","title":{"rendered":"Containers and Docker"},"content":{"rendered":"\n<ul class=\"wp-block-list\"><li>Containers packages into a single object &#8211;<ul><li>application&#8217;s\ncode<\/li><\/ul><ul><li>configurations<\/li><\/ul><ul><li>dependencies\n<\/li><\/ul><\/li><li>They share <ul><li>an\noperating system installed on the server <\/li><\/ul><ul><li>run\nas resource-isolated processes, <\/li><\/ul><\/li><li>Regardless of environment , they ensure deployments\nbeing <ul><li>quick\n<\/li><\/ul><ul><li>reliable\n<\/li><\/ul><ul><li>consistent\n<\/li><\/ul><\/li><li>Use cases<ul><li>Microservices<\/li><\/ul><ul><li>Batch\nprocessing<\/li><\/ul><ul><li>Machine\nlearning<\/li><\/ul><ul><li>Hybrid\napplications<\/li><\/ul><ul><li>Application\nmigration to the cloud<\/li><\/ul><ul><li>Platform\nas a service<\/li><\/ul><\/li><li>Benefits<ul><li>Run\nanywhere<\/li><\/ul><ul><li>Improve\nresource utilization<\/li><\/ul><ul><li>Scale\nquickly<\/li><\/ul><\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.testpreptraining.ai\/tutorial\/wp-content\/uploads\/2019\/08\/image012-1-600x400.png\" alt=\"\" class=\"wp-image-2115\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"286\" src=\"https:\/\/www.testpreptraining.ai\/tutorial\/wp-content\/uploads\/2019\/08\/image013-2-750x286.png\" alt=\"\" class=\"wp-image-2116\" srcset=\"https:\/\/www.testpreptraining.ai\/tutorial\/wp-content\/uploads\/2019\/08\/image013-2-750x286.png 750w, https:\/\/www.testpreptraining.ai\/tutorial\/wp-content\/uploads\/2019\/08\/image013-2.png 1190w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/figure>\n\n\n\n<p><strong>Amazon ECS<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>It is a highly scalable, high performance\ncontainer management service that supports Docker containers <\/li><li>It is a container orchestration service\nsupporting Docker containers and to run and scale containerized applications on\nAWS.<\/li><li>Allows you to easily run applications on a\nmanaged cluster of Amazon EC2 instances. <\/li><li>Eliminates the need for you to install, operate,\nand scale your own cluster management infrastructure. <\/li><\/ul>\n\n\n\n<p><strong>ECS Terms<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Task Definition \u2014 This a blueprint that\ndescribes how a docker container should launch. If you are already familiar\nwith AWS, it is like a LaunchConfig except instead it is for a docker container\ninstead of a instance. It contains settings like exposed port, docker image,\ncpu shares, memory requirement, command to run and environmental variables.<\/li><li>Task \u2014 This is a running container with the\nsettings defined in the Task Definition. It can be thought of as an \u201cinstance\u201d\nof a Task Definition.<\/li><li>Service \u2014 Defines long running tasks of the same\nTask Definition. This can be 1 running container or multiple running containers\nall using the same Task Definition.<\/li><li>Cluster \u2014 A logic group of EC2 instances. When\nan instance launches the ecs-agent software on the server registers the\ninstance to an ECS Cluster. This is easily configurable by setting the\nECS_CLUSTER variable in \/etc\/ecs\/ecs.config described here.<\/li><li>Container Instance \u2014 This is just an EC2\ninstance that is part of an ECS Cluster and has docker and the ecs-agent\nrunning on it.<\/li><li>Container agent \u2014 This is the agent that runs on\nEC2 instances to form the ECS cluster. If you\u2019re using the ECS optimized AMI,\nyou don\u2019t need to do anything as the agent comes with it. <\/li><li>Task definition \u2014 An application containing one\nor more containers. This is where you provide the Docker images, the amount of\nCPU\/Memory to use, ports etc. You can also link containers here, similar to a\nDocker command line.<\/li><li>Service \u2014 A service in ECS allows you to run and\nmaintain a specified number of instances of a task definition. If a task in a\nservice stops, the task is restarted. Services ensure that the desired running\ntasks are achieved and maintained. Services can also include things like load\nbalancer configuration, IAM roles and placement strategies.<\/li><li>Service auto-scaling \u2014 This is similar to the EC2 auto scaling concept but applies to the number of containers you\u2019re running for each service. The ECS service scheduler respects the desired count at all times. Additionally, a scaling policy can be configured to trigger a scale-out based on alarms. <\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"668\" height=\"254\" src=\"https:\/\/www.testpreptraining.ai\/tutorial\/wp-content\/uploads\/2019\/08\/image014.png\" alt=\"\" class=\"wp-image-2117\"\/><\/figure>\n\n\n\n<p><strong>Amazon ECS Application &nbsp;<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Microservices &#8211; Amazon ECS helps you run\nmicroservices applications with native integration to AWS services and enables\ncontinuous integration and continuous deployment (CICD) pipelines.<\/li><li>Batch processing &#8211; Amazon ECS lets you run batch\nworkloads with managed or custom schedulers on Amazon EC2 On-Demand Instances,\nReserved Instances, or Spot Instances.<\/li><li>Application migration to the cloud &#8211; Legacy\nenterprise applications can be containerized and easily migrated to Amazon ECS\nwithout requiring code changes.<\/li><li>Machine learning &#8211; Amazon ECS makes it easy to\ncontainerize ML models for both training and inference. You can create ML\nmodels made up of loosely coupled, distributed services that can be placed on\nany number of platforms, or close to the data that the applications are\nanalyzing.<\/li><\/ul>\n\n\n\n<p><strong>Amazon ECS Working<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"265\" src=\"https:\/\/www.testpreptraining.ai\/tutorial\/wp-content\/uploads\/2019\/08\/image015-1-750x265.png\" alt=\"\" class=\"wp-image-2118\"\/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Containers packages into a single object &#8211; application&#8217;s code configurations dependencies They share an operating system installed on the server run as resource-isolated processes, Regardless of environment , they ensure deployments being quick reliable consistent Use cases Microservices Batch processing Machine learning Hybrid applications Application migration to the cloud Platform as a service Benefits Run&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":2084,"menu_order":8,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"categories":[],"tags":[7,383,372,380,384],"class_list":["post-2114","page","type-page","status-publish","hentry","tag-aws","tag-containers","tag-devops","tag-devops-engineer","tag-docker"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Containers and Docker - Testprep Training Tutorials<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.testpreptraining.ai\/tutorial\/aws-devops-engineer\/containers-and-docker\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Containers and Docker - Testprep Training Tutorials\" \/>\n<meta property=\"og:description\" content=\"Containers packages into a single object &#8211; application&#8217;s code configurations dependencies They share an operating system installed on the server run as resource-isolated processes, Regardless of environment , they ensure deployments being quick reliable consistent Use cases Microservices Batch processing Machine learning Hybrid applications Application migration to the cloud Platform as a service Benefits Run...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.testpreptraining.ai\/tutorial\/aws-devops-engineer\/containers-and-docker\/\" \/>\n<meta property=\"og:site_name\" content=\"Testprep Training Tutorials\" \/>\n<meta property=\"article:modified_time\" content=\"2020-05-02T07:31:16+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.testpreptraining.ai\/tutorial\/wp-content\/uploads\/2019\/08\/image012-1-600x400.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/aws-devops-engineer\/containers-and-docker\/\",\"url\":\"https:\/\/www.testpreptraining.ai\/tutorial\/aws-devops-engineer\/containers-and-docker\/\",\"name\":\"Containers and Docker - Testprep Training Tutorials\",\"isPartOf\":{\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#website\"},\"datePublished\":\"2019-08-22T07:00:32+00:00\",\"dateModified\":\"2020-05-02T07:31:16+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/aws-devops-engineer\/containers-and-docker\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.testpreptraining.ai\/tutorial\/aws-devops-engineer\/containers-and-docker\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/aws-devops-engineer\/containers-and-docker\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.testpreptraining.ai\/tutorial\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"AWS Certified DevOps Engineer Professional\",\"item\":\"https:\/\/www.testpreptraining.ai\/tutorial\/aws-devops-engineer\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Containers and Docker\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#website\",\"url\":\"https:\/\/www.testpreptraining.ai\/tutorial\/\",\"name\":\"Testprep Training Tutorials\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.testpreptraining.ai\/tutorial\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#organization\",\"name\":\"Testprep Training\",\"url\":\"https:\/\/www.testpreptraining.ai\/tutorial\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.testpreptraining.com\/tutorial\/wp-content\/uploads\/2020\/07\/tpt-logo-6.png\",\"contentUrl\":\"https:\/\/www.testpreptraining.com\/tutorial\/wp-content\/uploads\/2020\/07\/tpt-logo-6.png\",\"width\":583,\"height\":153,\"caption\":\"Testprep Training\"},\"image\":{\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Containers and Docker - Testprep Training Tutorials","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:\/\/www.testpreptraining.ai\/tutorial\/aws-devops-engineer\/containers-and-docker\/","og_locale":"en_US","og_type":"article","og_title":"Containers and Docker - Testprep Training Tutorials","og_description":"Containers packages into a single object &#8211; application&#8217;s code configurations dependencies They share an operating system installed on the server run as resource-isolated processes, Regardless of environment , they ensure deployments being quick reliable consistent Use cases Microservices Batch processing Machine learning Hybrid applications Application migration to the cloud Platform as a service Benefits Run...","og_url":"https:\/\/www.testpreptraining.ai\/tutorial\/aws-devops-engineer\/containers-and-docker\/","og_site_name":"Testprep Training Tutorials","article_modified_time":"2020-05-02T07:31:16+00:00","og_image":[{"url":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-content\/uploads\/2019\/08\/image012-1-600x400.png"}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/aws-devops-engineer\/containers-and-docker\/","url":"https:\/\/www.testpreptraining.ai\/tutorial\/aws-devops-engineer\/containers-and-docker\/","name":"Containers and Docker - Testprep Training Tutorials","isPartOf":{"@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#website"},"datePublished":"2019-08-22T07:00:32+00:00","dateModified":"2020-05-02T07:31:16+00:00","breadcrumb":{"@id":"https:\/\/www.testpreptraining.ai\/tutorial\/aws-devops-engineer\/containers-and-docker\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.testpreptraining.ai\/tutorial\/aws-devops-engineer\/containers-and-docker\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/aws-devops-engineer\/containers-and-docker\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.testpreptraining.ai\/tutorial\/"},{"@type":"ListItem","position":2,"name":"AWS Certified DevOps Engineer Professional","item":"https:\/\/www.testpreptraining.ai\/tutorial\/aws-devops-engineer\/"},{"@type":"ListItem","position":3,"name":"Containers and Docker"}]},{"@type":"WebSite","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#website","url":"https:\/\/www.testpreptraining.ai\/tutorial\/","name":"Testprep Training Tutorials","description":"","publisher":{"@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.testpreptraining.ai\/tutorial\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#organization","name":"Testprep Training","url":"https:\/\/www.testpreptraining.ai\/tutorial\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#\/schema\/logo\/image\/","url":"https:\/\/www.testpreptraining.com\/tutorial\/wp-content\/uploads\/2020\/07\/tpt-logo-6.png","contentUrl":"https:\/\/www.testpreptraining.com\/tutorial\/wp-content\/uploads\/2020\/07\/tpt-logo-6.png","width":583,"height":153,"caption":"Testprep Training"},"image":{"@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/pages\/2114","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/comments?post=2114"}],"version-history":[{"count":4,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/pages\/2114\/revisions"}],"predecessor-version":[{"id":2404,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/pages\/2114\/revisions\/2404"}],"up":[{"embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/pages\/2084"}],"wp:attachment":[{"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/media?parent=2114"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/categories?post=2114"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/tags?post=2114"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}