Add /etc/nsswitch.conf to our Dockerfile (#5882)

As mentioned in the comment, this is required to get DNS requests to
work. This is more important than one might realize at first:

`daml start` tries to make an HTTP request to localhost:7500 to wait
for Navigator to start up. However, in our docker image, these
requests currently fail completely since they fail to resolve
`localhost`. This stops all following steps, in particular,
`init-script` and the JSON API from starting up.

changelog_begin
changelog_end
This commit is contained in:
Moritz Kiefer 2020-05-07 09:44:44 +02:00 committed by GitHub
parent a47c734401
commit 3bf2402d2c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,10 @@
FROM openjdk:8u212-alpine
RUN apk add --no-cache curl bash
ARG VERSION
# This is needed to get the DNS requests
# from Haskell binaries to succeed.
# Otherwise they fail to even resolve localhost.
RUN echo 'hosts: files dns' > /etc/nsswitch.conf
RUN addgroup -S daml && adduser -S daml -G daml
USER daml
RUN curl https://get.daml.com | sh -s $VERSION \