Answer the question
In order to leave comments, you need to log in
How to enable Nginx to read docker.sock?
There is a server with docker and nginx. We need the ability to connect via websocket with containers ( doc .). nginx config:
server {
server_name domain.ru;
location ~ws/?$ {
proxy_pass http://unix:/var/run/docker.sock;
proxy_http_version 1.1;
proxy_set_header Upgrade "websocket";
proxy_set_header Connection "upgrade";
}
}
connect() to unix:/var/run/docker.sock failed (13: Permission denied
sudo usermod -aGdocker www-data
it, but I understand that it is not safe.
Answer the question
In order to leave comments, you need to log in
Answer here:
https://docs.docker.com/engine/install/linux-posti...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question