Học cách Installing Docker Compose chuẩn nhất
11th Mar 2022Although you can install Docker Compose from the official Ubuntu repositories, it is several minor versions behind the latest release, so you’ll install Docker Compose from Docker’s GitHub repository.
Check the current release and if necessary, update it in the command below:
mkdir -p ~/.docker/cli-plugins/ curl -SL https://github.com/docker/compose/releases/download/v2.2.3/docker-compose-linux-x86_64 -o ~/.docker/cli-plugins/docker-compose
Next set the permissions:
chmod +x ~/.docker/cli-plugins/docker-compose sudo chown $USER /var/run/docker.sock sudo ln -s ~/.docker/cli-plugins/docker-compose /usr/bin/docker-compose
Then you’ll verify that the installation was successful by checking the version:
docker compose version
This will print out the version you installed:
Output
Docker Compose version v2.2.3
Cuối cùng
sudo systemctl start docker sudo chmod 666 /var/run/docker.sock
Add new comment