Docker, can't reach “rails server” development from localhost:3000 using docker flag -p 3000:3000

后端 未结 1 505
梦如初夏
梦如初夏 2020-12-30 15:06

I\'m trying to use docker with rails, building an entire stack inside one container. My endgoal is to have an nginx/memcached/unicorn/rails/postgres stack with runit as the

相关标签:
1条回答
  • 2020-12-30 15:45

    This was actually caused by boot2docker. See this page for more info: https://github.com/boot2docker/boot2docker/blob/master/doc/WORKAROUNDS.md

    TLDR

    Portforwarding only works with a hack on boot2docker currently. You need to run the following command (and keep it running):

    boot2docker ssh -L 8080:localhost:80
    

    Where 80 is the exposed port on the container and 8080 is the port you want to access it from on your host.

    0 讨论(0)
提交回复
热议问题