I'm trying to connect my rails app which is in the docker container and trying to connect that to host machine's Redis server which is running on port 6379. I'm getting
dockefile EXPOSE 3000 EXPOSE 6379
sudo docker run -it -e RAILS_ENV=development -p 3000:3000 -p 6379:6380 <containerid>
gives error
Redis::ConnectionError: Connection lost (ECONNRESET)
when redis is running on 6380.
and
when I try to run Redis on 6379 I get the following error
with
sudo docker run -it -e RAILS_ENV=development -p 3000:3000 -p 6379:6379
docker: Error response from daemon: driver failed programming external connectivity on endpoint vigorous_turing (2b5c8e2b4f5df5f1bfcccfdfc87fd5ea78c5c2643de4e00774e7dec67acbd8c4): Error starting userland proxy: listen tcp 0.0.0.0:6379: bind: address already in use.