After logging in to EC2 with Remote Development in VSCode
, the VSCode plug-in does not work properly because the docker
command cannot be executed.
Install docker etc.
# install docker
sudo amazon-linux-extras install -y docker
# auto start docker service
sudo systemctl enable docker
sudo systemctl start docker
# install docker-compose
sudo curl -L "https://github.com/docker/compose/releases/download/1.27.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
Add user to Docker group
sudo usermod -a -G docker ec2-user
** You can check after restarting EC2. ** **
docker info
Recommended Posts