提供对iPv6的支持

时间:2018-10-31 03:03:15

标签: ruby-on-rails amazon-web-services docker ipv6

我们正在将滑轨用于我们的一种应用。还有一个iOS应用程序,它依赖于rails后端对用户和其他操作进行身份验证。由于苹果需要应用程序来支持iPv6,所以我想知道转换使用docker容器化并使用Amazon ecs部署的rails后端的最佳方法是什么,以提供对iPv6的支持。

对于rails部分,我已经能够启动rails后端以侦听iPv4和iPv6。这是我的用于启动容器的Dockerfile的副本。

FROM ruby:2.4.1

RUN apt-get update -qq && apt-get install -y build-essential libpq-dev 
nodejs cron postgresql-client-9.4 dos2unix

ENV APP_HOME /my_app
RUN  mkdir $APP_HOME
WORKDIR $APP_HOME

RUN echo 'gem: --no-rdoc --no-ri' >> "$HOME/.gemrc"

RUN gem install bundler

ADD Gemfile $APP_HOME/Gemfile
ADD Gemfile.lock $APP_HOME/Gemfile.lock


RUN bundle install

ADD . $APP_HOME

RUN find . -type f -print0 | xargs -0 dos2unix
RUN apt-get clean && rm -rf /car/lib/apt/lists/* /tmp/* /var/tmp/* && 
apt-get --purge remove -y dos2unix
EXPOSE 80

# Boot the server
CMD echo env
CMD rake build


#this is how I was booting the server for only iPv4  
#CMD bundle install && rails s -b '0.0.0.0' -p 80

#booting for both iPv4 and iPv6
CMD bundle install && rails s -b [::] -p 80

到目前为止,我已经查看了以下链接:

https://developer.apple.com/library/archive/documentation/NetworkingInternetWeb/Conceptual/NetworkingOverview/UnderstandingandPreparingfortheIPv6Transition/UnderstandingandPreparingfortheIPv6Transition.html

https://docs.docker.com/v17.09/engine/tutorials/networkingcontainers/

https://blog.cloudflare.com/supporting-the-transition-to-ipv6-only-networking-services-for-ios/

但是没有什么太具体的了,我完全迷失了完成所有这些工作的其他关键步骤。

任何帮助将不胜感激。

0 个答案:

没有答案