I just tried to deploy a Ruby on Rails app using the new Kamal 2, I learned that the .env changed to use credentials defined in secrets or a command so thats cool and I had my deploy working correctly until it finished installing docker on AWS and I got a permission denied error. The user account didn't have permissions to access the docker daemon socket. I looked up the error online and quickly found an article which showed a fix.
SSH into the server and then run this command
sudo usermod -a -G docker $USER
Then you have to log out and it should work
I did this and verified it worked by running docker ps which previously threw an error
I'm guessing the permission error is because I specified a user other than root, I set my user to "ubuntu" which the aws server was using for a default username.
Anyways the command that fixed it for me could be added into Kamal to reduce the struggle of deploying, I might look into the code and see If it makes sense to add in to the kamal setup script
I just tried to deploy a Ruby on Rails app using the new Kamal 2, I learned that the .env changed to use credentials defined in secrets or a command so thats cool and I had my deploy working correctly until it finished installing docker on AWS and I got a permission denied error. The user account didn't have permissions to access the docker daemon socket. I looked up the error online and quickly found an article which showed a fix. SSH into the server and then run this command
sudo usermod -a -G docker $USER
Then you have to log out and it should work I did this and verified it worked by runningdocker ps
which previously threw an errorI'm guessing the permission error is because I specified a user other than root, I set my user to "ubuntu" which the aws server was using for a default username.
Anyways the command that fixed it for me could be added into Kamal to reduce the struggle of deploying, I might look into the code and see If it makes sense to add in to the kamal setup script