chore(docker): set up nsswitch.conf for Go's "netgo" implementation

set up nsswitch.conf for Go's "netgo" implementation

Signed-off-by: mritd <mritd@linux.com>
This commit is contained in:
mritd 2021-08-13 16:04:31 +08:00
parent 9ad8471aa1
commit 6c16721445
No known key found for this signature in database
GPG key ID: 98C41327E6D3E645

View file

@ -28,6 +28,11 @@ FROM alpine AS dist
LABEL maintainer="mritd <mritd@linux.com>"
# set up nsswitch.conf for Go's "netgo" implementation
# - https://github.com/golang/go/blob/go1.9.1/src/net/conf.go#L194-L275
# - docker run --rm debian:stretch grep '^hosts:' /etc/nsswitch.conf
RUN [ ! -e /etc/nsswitch.conf ] && echo 'hosts: files dns' > /etc/nsswitch.conf
# bash is used for debugging, tzdata is used to add timezone information.
# Install ca-certificates to ensure no CA certificate errors.
#