2
DockerでカスタムDNSサーバーを構成する方法
/etc/hostsWebアプリがDockerコンテナー内で機能するように、数行追加する必要があります。 Docker /etc/hostsは読み取り専用です。 私はdnsmasqを使用しようとしています: ubuntuから:14.04 #... apt-get install -y -q dnsmasqを実行します。 RUN echo 'listen-address = 127.0.0.1' >> /etc/dnsmasq.conf 実行エコー 'resolv-file = / etc / resolv.dnsmasq.conf' >> /etc/dnsmasq.conf RUN echo 'conf-dir = / etc / dnsmasq.d' >> /etc/dnsmasq.conf RUN echo 'user = root' >> /etc/dnsmasq.conf RUN echo 'nameserver 8.8.8.8' >> /etc/resolv.dnsmasq.conf …