InfraPlatform
Linux Docker Install
IT오이시이
2024. 8. 23. 22:34
728x90
Linux Docker Install
Step 1: Install Docker
sudo dnf install -y dnf-plugins-core
sudo dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
sudo dnf install docker-ce docker-ce-cli containerd.io --allowerasing
sudo systemctl start docker
sudo systemctl enable docker
Step 2: Install Docker Compose
Download Docker Compose Binary:
sudo curl -L "https://github.com/docker/compose/releases/download/v2.20.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
Apply Executable Permissions:
sudo chmod +x /usr/local/bin/docker-compose
Verify Installation:
# docker-compose --version
Docker Compose version v2.20.2
Step 3: Create a Symlink (Optional)
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
Step 4 : 실행 환경을 추가한다.
echo 'export PATH=$PATH:/usr/local/bin' >> ~/.bashrc
source ~/.bashrc
728x90
반응형