{"id":7681,"date":"2020-02-20T17:08:23","date_gmt":"2020-02-20T14:08:23","guid":{"rendered":"http:\/\/unihost.com\/help\/?p=7681"},"modified":"2023-09-13T17:15:48","modified_gmt":"2023-09-13T14:15:48","slug":"how-to-install-and-use-docker-compose-on-centos-8","status":"publish","type":"post","link":"https:\/\/unihost.com\/help\/how-to-install-and-use-docker-compose-on-centos-8\/","title":{"rendered":"How to install Docker Compose on CentOS 8"},"content":{"rendered":"<h2><iframe loading=\"lazy\"  id=\"_ytid_51810\"  width=\"980\" height=\"551\"  data-origwidth=\"980\" data-origheight=\"551\" src=\"https:\/\/www.youtube.com\/embed\/PP2il3wypPY\">https:\/\/www.youtube.com\/watch?enablejsapi=1&autoplay=0&cc_load_policy=0&cc_lang_pref=&iv_load_policy=1&loop=0&rel=1&fs=1&playsinline=0&autohide=2&theme=dark&color=red&controls=1&\" class=\"__youtube_prefs__  no-lazyload\" title=\"YouTube player\"  allow=\"fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen data-no-lazy=\"1\" data-skipgform_ajax_framebjll=\"\"><\/iframe><\/h2>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Compose is a tool for defining and running multi-container Docker applications.<\/span><!--more--><\/p>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"> With Docker Compose, you can link multiple containers and deploy an application from a single command. Docker Compose uses a YAML file to define a complex stack in a file. Then, with a single command, you create and start all the services from your configuration.<\/span><\/p>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">In this tutorial, I will show you how to install Docker Compose on CentOS 8.<\/span><\/p>\n<h2 id=\"install-docker\"><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Install Docker<\/span><\/h2>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Update your system.<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"># dnf update -y<\/span><\/pre>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Add Docker-CE repository to your system.<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"># dnf config-manager --add-repo=https:\/\/download.docker.com\/linux\/centos\/docker-ce.repo<\/span><\/pre>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Install the latest version of docker.<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"># dnf install docker-ce --nobest<\/span><\/pre>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Start docker and add it to startup.<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"># systemctl start docker<\/span>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"># systemctl enable docker<\/span><\/pre>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Verify the docker version.<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"># docker --version<\/span>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Docker version 19.03.6, build 369ce74a3c<\/span><\/pre>\n<h2><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Install Docker Compose<\/span><\/h2>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Docker Compose is not available in the CentOS 8 default repository. You need to download it from the Git.<\/span><\/p>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Install the curl command.<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"># dnf install curl<\/span><\/pre>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Download the latest version of Docker Compose.<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"># curl -L https:\/\/github.com\/docker\/compose\/releases\/download\/1.25.4\/docker-compose-`uname -s`-`uname -m` -o \/usr\/local\/bin\/docker-compose<\/span><\/pre>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">You can check the lastest releases <a href=\"https:\/\/github.com\/docker\/compose\/releases\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">here<\/a>\u00a0<\/span><\/p>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><strong>Note:<\/strong> If the command docker-compose fails after installation, check your path. You can also create a symbolic link to <em>\/usr\/bin<\/em> or any other directory in your path.\u00a0<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"># ln -s \/usr\/local\/bin\/docker-compose \/usr\/bin\/docker-compose<\/span><\/pre>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Test the installation.<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"># docker-compose --version<\/span>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">docker-compose version 1.25.4, build 8d51620a<\/span><\/pre>\n<h2><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Uninstallation<\/span><\/h2>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">To uninstall Docker Compose if you installed using curl.<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"># rm \/usr\/local\/bin\/docker-compose<\/span>\n\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"># dnf remove docker-ce\n\n<\/span><\/pre>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">We have also collected in one place the <a href=\"https:\/\/unihost.com\/en\/dedicated\/hot-offer\/\">most popular server models for work<\/a> from Unihost<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Compose is a tool for defining and running multi-container Docker applications.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[158],"tags":[58,215],"class_list":["post-7681","post","type-post","status-publish","format-standard","hentry","category-dedicated-servers","tag-centos","tag-docker"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to install Docker Compose on CentOS 8 - Unihost.FAQ<\/title>\n<meta name=\"description\" content=\"In this tutorial, I will show you how to install Docker Compose on CentOS 8. How to install Docker Compose on CentOS 8\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/unihost.com\/help\/how-to-install-and-use-docker-compose-on-centos-8\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to install Docker Compose on CentOS 8 - Unihost.FAQ\" \/>\n<meta property=\"og:description\" content=\"In this tutorial, I will show you how to install Docker Compose on CentOS 8. How to install Docker Compose on CentOS 8\" \/>\n<meta property=\"og:url\" content=\"https:\/\/unihost.com\/help\/how-to-install-and-use-docker-compose-on-centos-8\/\" \/>\n<meta property=\"og:site_name\" content=\"Unihost.FAQ\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/unihost\/\" \/>\n<meta property=\"article:published_time\" content=\"2020-02-20T14:08:23+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-09-13T14:15:48+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/unihost.com\/help\/minio.php?.\/unihost-logo-alt.png\" \/>\n\t<meta property=\"og:image:width\" content=\"250\" \/>\n\t<meta property=\"og:image:height\" content=\"141\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Unihost Support\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@unihost\" \/>\n<meta name=\"twitter:site\" content=\"@unihost\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Unihost Support\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/unihost.com\/help\/how-to-install-and-use-docker-compose-on-centos-8\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/unihost.com\/help\/how-to-install-and-use-docker-compose-on-centos-8\/\"},\"author\":{\"name\":\"Unihost Support\",\"@id\":\"https:\/\/unihost.com\/help\/#\/schema\/person\/bb5ae95f38577c920e6a7507888b715a\"},\"headline\":\"How to install Docker Compose on CentOS 8\",\"datePublished\":\"2020-02-20T14:08:23+00:00\",\"dateModified\":\"2023-09-13T14:15:48+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/unihost.com\/help\/how-to-install-and-use-docker-compose-on-centos-8\/\"},\"wordCount\":212,\"publisher\":{\"@id\":\"https:\/\/unihost.com\/help\/#organization\"},\"keywords\":[\"CentOS\",\"Docker\"],\"articleSection\":[\"02. Dedicated servers\"],\"inLanguage\":\"en\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/unihost.com\/help\/how-to-install-and-use-docker-compose-on-centos-8\/\",\"url\":\"https:\/\/unihost.com\/help\/how-to-install-and-use-docker-compose-on-centos-8\/\",\"name\":\"How to install Docker Compose on CentOS 8 - Unihost.FAQ\",\"isPartOf\":{\"@id\":\"https:\/\/unihost.com\/help\/#website\"},\"datePublished\":\"2020-02-20T14:08:23+00:00\",\"dateModified\":\"2023-09-13T14:15:48+00:00\",\"description\":\"In this tutorial, I will show you how to install Docker Compose on CentOS 8. How to install Docker Compose on CentOS 8\",\"breadcrumb\":{\"@id\":\"https:\/\/unihost.com\/help\/how-to-install-and-use-docker-compose-on-centos-8\/#breadcrumb\"},\"inLanguage\":\"en\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/unihost.com\/help\/how-to-install-and-use-docker-compose-on-centos-8\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/unihost.com\/help\/how-to-install-and-use-docker-compose-on-centos-8\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Unihost\",\"item\":\"https:\/\/unihost.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Help\",\"item\":\"https:\/\/unihost.com\/help\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"How to install Docker Compose on CentOS 8\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/unihost.com\/help\/#website\",\"url\":\"https:\/\/unihost.com\/help\/\",\"name\":\"Unihost.FAQ\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/unihost.com\/help\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/unihost.com\/help\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/unihost.com\/help\/#organization\",\"name\":\"Unihost\",\"alternateName\":\"Unihost\",\"url\":\"https:\/\/unihost.com\/help\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en\",\"@id\":\"https:\/\/unihost.com\/help\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/unihost.com\/help\/minio.php?2026\/01\/minio.png\",\"contentUrl\":\"https:\/\/unihost.com\/help\/minio.php?2026\/01\/minio.png\",\"width\":300,\"height\":300,\"caption\":\"Unihost\"},\"image\":{\"@id\":\"https:\/\/unihost.com\/help\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/unihost\/\",\"https:\/\/x.com\/unihost\",\"https:\/\/www.instagram.com\/unihost\/?hl=en\",\"https:\/\/www.linkedin.com\/company\/unihost-com\",\"https:\/\/www.youtube.com\/channel\/UCITKsxMDnslQY8brN3advgw\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/unihost.com\/help\/#\/schema\/person\/bb5ae95f38577c920e6a7507888b715a\",\"name\":\"Unihost Support\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en\",\"@id\":\"https:\/\/unihost.com\/help\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/a0c9db17c2a0d93e8a0d5ac123f8c5db750ad4d3d5657369c0c4e480f5af77b8?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/a0c9db17c2a0d93e8a0d5ac123f8c5db750ad4d3d5657369c0c4e480f5af77b8?s=96&d=mm&r=g\",\"caption\":\"Unihost Support\"},\"sameAs\":[\"https:\/\/unihost.com\/\"],\"url\":\"https:\/\/unihost.com\/help\/author\/support\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to install Docker Compose on CentOS 8 - Unihost.FAQ","description":"In this tutorial, I will show you how to install Docker Compose on CentOS 8. How to install Docker Compose on CentOS 8","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:\/\/unihost.com\/help\/how-to-install-and-use-docker-compose-on-centos-8\/","og_locale":"en_US","og_type":"article","og_title":"How to install Docker Compose on CentOS 8 - Unihost.FAQ","og_description":"In this tutorial, I will show you how to install Docker Compose on CentOS 8. How to install Docker Compose on CentOS 8","og_url":"https:\/\/unihost.com\/help\/how-to-install-and-use-docker-compose-on-centos-8\/","og_site_name":"Unihost.FAQ","article_publisher":"https:\/\/www.facebook.com\/unihost\/","article_published_time":"2020-02-20T14:08:23+00:00","article_modified_time":"2023-09-13T14:15:48+00:00","og_image":[{"width":250,"height":141,"url":"https:\/\/unihost.com\/help\/minio.php?.\/unihost-logo-alt.png","type":"image\/png"}],"author":"Unihost Support","twitter_card":"summary_large_image","twitter_creator":"@unihost","twitter_site":"@unihost","twitter_misc":{"Written by":"Unihost Support","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/unihost.com\/help\/how-to-install-and-use-docker-compose-on-centos-8\/#article","isPartOf":{"@id":"https:\/\/unihost.com\/help\/how-to-install-and-use-docker-compose-on-centos-8\/"},"author":{"name":"Unihost Support","@id":"https:\/\/unihost.com\/help\/#\/schema\/person\/bb5ae95f38577c920e6a7507888b715a"},"headline":"How to install Docker Compose on CentOS 8","datePublished":"2020-02-20T14:08:23+00:00","dateModified":"2023-09-13T14:15:48+00:00","mainEntityOfPage":{"@id":"https:\/\/unihost.com\/help\/how-to-install-and-use-docker-compose-on-centos-8\/"},"wordCount":212,"publisher":{"@id":"https:\/\/unihost.com\/help\/#organization"},"keywords":["CentOS","Docker"],"articleSection":["02. Dedicated servers"],"inLanguage":"en"},{"@type":"WebPage","@id":"https:\/\/unihost.com\/help\/how-to-install-and-use-docker-compose-on-centos-8\/","url":"https:\/\/unihost.com\/help\/how-to-install-and-use-docker-compose-on-centos-8\/","name":"How to install Docker Compose on CentOS 8 - Unihost.FAQ","isPartOf":{"@id":"https:\/\/unihost.com\/help\/#website"},"datePublished":"2020-02-20T14:08:23+00:00","dateModified":"2023-09-13T14:15:48+00:00","description":"In this tutorial, I will show you how to install Docker Compose on CentOS 8. How to install Docker Compose on CentOS 8","breadcrumb":{"@id":"https:\/\/unihost.com\/help\/how-to-install-and-use-docker-compose-on-centos-8\/#breadcrumb"},"inLanguage":"en","potentialAction":[{"@type":"ReadAction","target":["https:\/\/unihost.com\/help\/how-to-install-and-use-docker-compose-on-centos-8\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/unihost.com\/help\/how-to-install-and-use-docker-compose-on-centos-8\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Unihost","item":"https:\/\/unihost.com\/"},{"@type":"ListItem","position":2,"name":"Help","item":"https:\/\/unihost.com\/help\/"},{"@type":"ListItem","position":3,"name":"How to install Docker Compose on CentOS 8"}]},{"@type":"WebSite","@id":"https:\/\/unihost.com\/help\/#website","url":"https:\/\/unihost.com\/help\/","name":"Unihost.FAQ","description":"","publisher":{"@id":"https:\/\/unihost.com\/help\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/unihost.com\/help\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en"},{"@type":"Organization","@id":"https:\/\/unihost.com\/help\/#organization","name":"Unihost","alternateName":"Unihost","url":"https:\/\/unihost.com\/help\/","logo":{"@type":"ImageObject","inLanguage":"en","@id":"https:\/\/unihost.com\/help\/#\/schema\/logo\/image\/","url":"https:\/\/unihost.com\/help\/minio.php?2026\/01\/minio.png","contentUrl":"https:\/\/unihost.com\/help\/minio.php?2026\/01\/minio.png","width":300,"height":300,"caption":"Unihost"},"image":{"@id":"https:\/\/unihost.com\/help\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/unihost\/","https:\/\/x.com\/unihost","https:\/\/www.instagram.com\/unihost\/?hl=en","https:\/\/www.linkedin.com\/company\/unihost-com","https:\/\/www.youtube.com\/channel\/UCITKsxMDnslQY8brN3advgw"]},{"@type":"Person","@id":"https:\/\/unihost.com\/help\/#\/schema\/person\/bb5ae95f38577c920e6a7507888b715a","name":"Unihost Support","image":{"@type":"ImageObject","inLanguage":"en","@id":"https:\/\/unihost.com\/help\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/a0c9db17c2a0d93e8a0d5ac123f8c5db750ad4d3d5657369c0c4e480f5af77b8?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/a0c9db17c2a0d93e8a0d5ac123f8c5db750ad4d3d5657369c0c4e480f5af77b8?s=96&d=mm&r=g","caption":"Unihost Support"},"sameAs":["https:\/\/unihost.com\/"],"url":"https:\/\/unihost.com\/help\/author\/support\/"}]}},"_links":{"self":[{"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/posts\/7681","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/comments?post=7681"}],"version-history":[{"count":9,"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/posts\/7681\/revisions"}],"predecessor-version":[{"id":16097,"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/posts\/7681\/revisions\/16097"}],"wp:attachment":[{"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/media?parent=7681"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/categories?post=7681"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/tags?post=7681"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}