Closed nick-ge closed 1 year ago
It looks like /etc/nsswitch.conf already contains the line hosts: files dns
in the chosen alpine base image, so that line is unnecessary, and it's failing because the line returns false without an || statement, causing the build to fail.
I would just remove the line entirely as it doesn't seem necessary.
@abjugard thanks for pointing that out.
Looks like the nsswitch stuff was removed from the golang
Docker image in https://github.com/docker-library/golang/commit/d66a926ed0c800594ce37c4c949ab4ece231c4af since it's no longer needed as you said.
@hairyhenderson I guess we should remove it from here now as well.
Dear caddy-docker maintainer,
I've tried to build a custom image from your Alpine Dockerfile (caddy-docker/2.6/alpine/Dockerfile) with the following command:
docker build --tag <custom-tag> .
During the building process I encountered the following error message:
I guess there might be a mistake since the test command checks if
/etc/nsswitch.conf
is not available and in case write to it. You probably mean to check whether/etc/nsswitch.conf
is indeed available. So no exclamation mark in test command. I guess the RUN statement was supposed to look like the following:RUN [ -e /etc/nsswitch.conf ] && echo 'hosts: files dns' > /etc/nsswitch.conf
Correct me if I'm wrong or missing something.
Best regards!