@@ -57,7 +57,7 @@ sudo yum update -y
57
57
Install the necessary packages required to set up the Docker repository.
58
58
59
59
``` bash
60
- sudo yum install -y yum-utils device-mapper-persistent-data lvm2
60
+ sudo yum install -y yum-utils
61
61
```
62
62
63
63
### Step 3: Set Up the Docker Repository
@@ -73,7 +73,7 @@ sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/dock
73
73
Install Docker Engine, CLI, and Containerd.
74
74
75
75
``` bash
76
- sudo yum install -y docker-ce docker-ce-cli containerd.io
76
+ sudo yum install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
77
77
```
78
78
79
79
### Step 5: Start and Enable Docker
@@ -95,27 +95,8 @@ sudo docker run hello-world
95
95
96
96
If the container runs and displays a welcome message, Docker is installed correctly.
97
97
98
- ### Step 7: Install Docker Compose
99
98
100
- Download the current stable release of Docker Compose:
101
-
102
- ``` bash
103
- sudo curl -L " https://github.com/docker/compose/releases/download/$( curl -s https://api.github.com/repos/docker/compose/releases/latest | grep -Po ' "tag_name": "\K.*?(?=")' ) /docker-compose-$( uname -s) -$( uname -m) " -o /usr/local/bin/docker-compose
104
- ```
105
-
106
- Apply executable permissions to the binary:
107
-
108
- ``` bash
109
- sudo chmod +x /usr/local/bin/docker-compose
110
- ```
111
-
112
- Verify that the installation was successful:
113
-
114
- ``` bash
115
- docker-compose --version
116
- ```
117
-
118
- ### Step 8: Adding Your User to the Docker Group (Optional)
99
+ ### Step 7: Adding Your User to the Docker Group (Optional)
119
100
120
101
To run Docker commands without ` sudo ` , add your user to the Docker group.
121
102
@@ -130,10 +111,9 @@ Log out and log back in to apply the group changes.
130
111
To remove Docker, the CLI, Containerd, and Docker Compose, use the following commands:
131
112
132
113
``` bash
133
- sudo yum remove docker-ce docker-ce-cli containerd.io
114
+ sudo yum remove docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-ce-rootless-extras
134
115
sudo rm -rf /var/lib/docker
135
116
sudo rm -rf /var/lib/containerd
136
- sudo rm /usr/local/bin/docker-compose
137
117
```
138
118
139
119
## Docker Installation for Amazon Linux OS
0 commit comments