Note install Docker and Docker compose Centos
Purpose: Practice, POC
Update to get the latest packages and security
sudo yum update
sudo yum upgrade
sudo reboot
Install yum-utils
sudo yum install -y yum-utils
Install Repository
sudo yum-config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo
Install Docker packages
sudo yum install docker-ce docker-ce-cli containerd.io
Start Docker services
sudo systemctl start docker
Enable Docker process on boot
sudo systemctl enable docker
Testing
sudo docker run hello-world
Install Docker-compose
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
How to use docker compose https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-compose-on-centos-7
Komentar