- Install Docker Compose
- Prerequisites
- Install Compose
- Install Compose on macOS
- Install Compose on Windows desktop systems
- Install Compose on Windows Server
- Install Compose on Linux systems
- Alternative install options
- Install using pip
- Install as a container
- Install pre-release builds
- Upgrading
- Uninstallation
- Install Docker Desktop on Mac
- System requirements
- Mac with Intel chip
- Mac with Apple silicon
- Install and run Docker Desktop on Mac
- Quick start guide
- Updates
- Uninstall Docker Desktop
- linux-notes.org
- Установка docker-compose в Unix/Linux
- Установка docker-compose в CentOS/Fedora/RedHat
- Установка docker-compose в Debian/Ubuntu
- Установка docker-compose в Mac OS X
- Использование docker-compose в Unix/Linux
- Добавить комментарий Отменить ответ
Install Docker Compose
Estimated reading time: 8 minutes
Accelerating new features in Docker Desktop
Docker Desktop helps you build, share, and run containers easily on Mac and Windows as you do on Linux. Docker handles the complex setup and allows you to focus on writing the code. Thanks to the positive support we received on the subscription updates, we’ve started working on Docker Desktop for Linux which is the second-most popular feature request in our public roadmap. If you are interested in early access, sign up for our Developer Preview program.
This page contains information on how to install Docker Compose. You can run Compose on macOS, Windows, and 64-bit Linux.
Prerequisites
Docker Compose relies on Docker Engine for any meaningful work, so make sure you have Docker Engine installed either locally or remote, depending on your setup.
On desktop systems like Docker Desktop for Mac and Windows, Docker Compose is included as part of those desktop installs.
On Linux systems, first install the Docker Engine for your OS as described on the Get Docker page, then come back here for instructions on installing Compose on Linux systems.
To run Compose as a non-root user, see Manage Docker as a non-root user.
Install Compose
Follow the instructions below to install Compose on Mac, Windows, Windows Server 2016, or Linux systems, or find out about alternatives like using the pip Python package manager or installing Compose as a container.
The instructions below outline installation of the current stable release (v1.29.2) of Compose. To install a different version of Compose, replace the given release number with the one that you want. For instructions to install Compose 2.0.0 on Linux, see Install Compose 2.0.0 on Linux.
Compose releases are also listed and available for direct download on the Compose repository release page on GitHub. To install a pre-release of Compose, refer to the install pre-release builds section.
Install Compose on macOS
Docker Desktop for Mac includes Compose along with other Docker apps, so Mac users do not need to install Compose separately. For installation instructions, see Install Docker Desktop on Mac.
Install Compose on Windows desktop systems
Docker Desktop for Windows includes Compose along with other Docker apps, so most Windows users do not need to install Compose separately. For install instructions, see Install Docker Desktop on Windows.
If you are running the Docker daemon and client directly on Microsoft Windows Server, follow the instructions in the Windows Server tab.
Install Compose on Windows Server
Follow these instructions if you are running the Docker daemon and client directly on Microsoft Windows Server and want to install Docker Compose.
Start an “elevated” PowerShell (run it as administrator). Search for PowerShell, right-click, and choose Run as administrator. When asked if you want to allow this app to make changes to your device, click Yes.
In PowerShell, since GitHub now requires TLS1.2, run the following:
Then run the following command to download the current stable release of Compose (v1.29.2):
Note: On Windows Server 2019, you can add the Compose executable to $Env:ProgramFiles\Docker . Because this directory is registered in the system PATH , you can run the docker-compose —version command on the subsequent step with no additional configuration.
Test the installation.
Install Compose on Linux systems
On Linux, you can download the Docker Compose binary from the Compose repository release page on GitHub. Follow the instructions from the link, which involve running the curl command in your terminal to download the binaries. These step-by-step instructions are also included below.
For alpine , the following dependency packages are needed: py-pip , python3-dev , libffi-dev , openssl-dev , gcc , libc-dev , rust , cargo and make .
Run this command to download the current stable release of Docker Compose:
To install a different version of Compose, substitute 1.29.2 with the version of Compose you want to use.
If you have problems installing with curl , see Alternative Install Options tab above.
Apply executable permissions to the binary:
Note: If the command docker-compose fails after installation, check your path. You can also create a symbolic link to /usr/bin or any other directory in your path.
Optionally, install command completion for the bash and zsh shell.
Test the installation.
Alternative install options
Install using pip
For alpine , the following dependency packages are needed: py-pip , python3-dev , libffi-dev , openssl-dev , gcc , libc-dev , rust , cargo , and make .
Compose can be installed from pypi using pip . If you install using pip , we recommend that you use a virtualenv because many operating systems have python system packages that conflict with docker-compose dependencies. See the virtualenv tutorial to get started.
If you are not using virtualenv,
pip version 6.0 or greater is required.
Install as a container
Compose can also be run inside a container, from a small bash script wrapper. To install compose as a container run this command:
Install pre-release builds
If you’re interested in trying out a pre-release build, you can download release candidates from the Compose repository release page on GitHub. Follow the instructions from the link, which involves running the curl command in your terminal to download the binaries.
Pre-releases built from the “master” branch are also available for download at https://dl.bintray.com/docker-compose/master/.
Pre-release builds allow you to try out new features before they are released, but may be less stable.
Upgrading
If you’re upgrading from Compose 1.2 or earlier, remove or migrate your existing containers after upgrading Compose. This is because, as of version 1.3, Compose uses Docker labels to keep track of containers, and your containers need to be recreated to add the labels.
If Compose detects containers that were created without labels, it refuses to run, so that you don’t end up with two sets of them. If you want to keep using your existing containers (for example, because they have data volumes you want to preserve), you can use Compose 1.5.x to migrate them with the following command:
Alternatively, if you’re not worried about keeping them, you can remove them. Compose just creates new ones.
Uninstallation
To uninstall Docker Compose if you installed using curl :
To uninstall Docker Compose if you installed using pip :
Got a “Permission denied” error?
If you get a “Permission denied” error using either of the above methods, you probably do not have the proper permissions to remove docker-compose . To force the removal, prepend sudo to either of the above commands and run again.
Источник
Install Docker Desktop on Mac
Estimated reading time: 7 minutes
Welcome to Docker Desktop for Mac. This page contains information about Docker Desktop for Mac system requirements, download URLs, instructions to install and update Docker Desktop for Mac.
Download Docker Desktop for Mac
System requirements
Your Mac must meet the following requirements to install Docker Desktop successfully.
Mac with Intel chip
macOS must be version 10.14 or newer. That is, Mojave, Catalina, or Big Sur. We recommend upgrading to the latest version of macOS.
If you experience any issues after upgrading your macOS to version 10.15, you must install the latest version of Docker Desktop to be compatible with this version of macOS.
Docker supports Docker Desktop on the most recent versions of macOS. That is, the current release of macOS and the previous two releases. As new major versions of macOS are made generally available, Docker stops supporting the oldest version and supports the newest version of macOS (in addition to the previous two releases). Docker Desktop currently supports macOS Mojave, macOS Catalina, and macOS Big Sur.
At least 4 GB of RAM.
VirtualBox prior to version 4.3.30 must not be installed as it is not compatible with Docker Desktop.
Mac with Apple silicon
You must install Rosetta 2 as some binaries are still Darwin/AMD64. To install Rosetta 2 manually from the command line, run the following command:
Install and run Docker Desktop on Mac
Double-click Docker.dmg to open the installer, then drag the Docker icon to the Applications folder.
Double-click Docker.app in the Applications folder to start Docker. In the example below, the Applications folder is in “grid” view mode.
The Docker menu () displays the Docker Subscription Service Agreement window. It includes a change to the terms of use for Docker Desktop.
Here’s a summary of the key changes:
- Our Docker Subscription Service Agreement includes a change to the terms of use for Docker Desktop
- It remains free for small businesses (fewer than 250 employees AND less than $10 million in revenue), personal use, education, and non-commercial open source projects.
- It requires a paid subscription for professional use in larger enterprises.
- The effective date of these terms is August 31, 2021. There is a grace period until January 31, 2022 for those that will require a paid subscription to use Docker Desktop.
- The existing Docker Free subscription has been renamed Docker Personal and we have introduced a Docker Business subscription .
- The Docker Pro, Team, and Business subscriptions include commercial use of Docker Desktop.
Click the checkbox to indicate that you accept the updated terms and then click Accept to continue. Docker Desktop starts after you accept the terms.
If you do not agree to the terms, the Docker Desktop application will close and you can no longer run Docker Desktop on your machine. You can choose to accept the terms at a later date by opening Docker Desktop.
For more information, see Docker Desktop License Agreement. We recommend that you also read the Blog and FAQs to learn how companies using Docker Desktop may be affected.
Quick start guide
If you’ve just installed the app, Docker Desktop launches the Quick Start Guide. The tutorial includes a simple exercise to build an example Docker image, run it is a container, push and save the image to Docker Hub.
Congratulations! You are now successfully running Docker Desktop. Click the Docker menu () to see Preferences and other options. To run the Quick Start Guide on demand, select the Docker menu and then choose Quick Start Guide.
Updates
When an update is available, Docker Desktop displays an icon to indicate the availability of a newer version.
Starting with Docker Desktop 4.1.0, the Software Updates section in the General tab also notifies you of any updates available to Docker Desktop. You can choose to download the update right away, or click the Release Notes option to learn what’s included in the updated version. If you are on a Docker Team or a Business subscription, you can turn off the check for updates by clearing the Automatically Check for Updates checkbox in the General settings. This will also disable the notification badge that appears on the Docker Dashboard.
To encourage developers to stay up to date, Docker Desktop displays a reminder two weeks after an update becomes available. You can dismiss this daily reminder by clicking Snooze. You can skip an update when a reminder appears by clicking the Skip this update option.
Docker Subscription Service Agreement
Beginning on August 31, 2021, you must agree to the Docker Subscription Service Agreement to continue using Docker Desktop. Read the Blog and the Docker subscription FAQs to learn more about the changes.
Click Download update When you are ready to download the update. This downloads the update in the background. After downloading the update, click Update and restart from the Docker menu. This installs the latest update and restarts Docker Desktop for the changes to take effect.
When Docker Desktop starts, it displays the Docker Subscription Service Agreement window. Read the information presented on the screen to understand how the changes impact you. Click the checkbox to indicate that you accept the updated terms and then click Accept to continue.
If you do not agree to the terms, the Docker Desktop application will close and you can no longer run Docker Desktop on your machine. You can choose to accept the terms at a later date by opening Docker Desktop.
Docker Desktop starts after you accept the terms.
Uninstall Docker Desktop
To uninstall Docker Desktop from your Mac:
- From the Docker menu, select Troubleshoot and then select Uninstall.
- Click Uninstall to confirm your selection.
Uninstalling Docker Desktop destroys Docker containers, images, volumes, and other Docker related data local to the machine, and removes the files generated by the application. Refer to the back up and restore data section to learn how to preserve important data before uninstalling.
Источник
linux-notes.org
Установка docker-compose в Unix/Linux
docker-compose — это инструмент для определения и запуска многоконтейнерных приложений Docker. И я хочу описать установку данного сервиса.
Установка docker-compose в CentOS/Fedora/RedHat
Есть несколько способов установить docker-compose.
-=== СПОСОБ 1 — Использовать готовый файл===-
Процесс установки заключается в скачивании файла:
Прописываем (назначаем) пермишены:
-=== СПОСОБ 2 — Использовать установщик pip===-
Установим для начала PIP:
И потом, выполняем:
-=== СПОСОБ 3 — Использовать готовый bash скрипт===-
Процесс установки заключается в скачивании файла:
Прописываем (назначаем) пермишены:
Установка docker-compose в Debian/Ubuntu
Есть несколько способов установить docker-compose.
-=== СПОСОБ 1 — Использовать готовый файл===-
Процесс установки заключается в скачивании файла:
Прописываем (назначаем) пермишены:
-=== СПОСОБ 2 — Использовать установщик pip===-
Установим для начала PIP:
И потом, выполняем:
-=== СПОСОБ 3 — Использовать готовый bash скрипт===-
Процесс установки заключается в скачивании файла:
Прописываем (назначаем) пермишены:
Установка docker-compose в Mac OS X
Есть несколько способов установить докер компос на мак.
-=== СПОСОБ 1 — Использовать dmg пакет===-
А как установить данный пакет через консоль, я описывал тут:
-=== СПОСОБ 2 — Использовать homebrew===-
Как по мне, проще всего, использовать brew. Для начала нужно его установить — Установка homebrew в Mac OS X и после чего, выполним поиск пакета:
Для установки, используем:
Использование docker-compose в Unix/Linux
Рекомендую поставить автокомплитер для докер и докер-компос, установить можно вот так:
Чтобы настройки применились, выполняем:
Проверим какая версия используется:
Для запуска docker-compose используйте:
Чтобы запустить службу как демон, используйте:
Чтобы проверить какие контейнеры запущены, можно использовать:
Для остановки докер компоса, выполните:
Чтобы удалить связанные контейнеры, выполните:
Для помощи, вызовите:
А на этом у меня все, статья «Установка docker-compose в Unix/Linux» завершена.
Добавить комментарий Отменить ответ
Этот сайт использует Akismet для борьбы со спамом. Узнайте, как обрабатываются ваши данные комментариев.
Источник