You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Step 6/18 : RUN [ ! -e /etc/nsswitch.conf ] && echo 'hosts: files dns' > /etc/nsswitch.conf
---> Running in 3762efc54156
The command '/bin/sh -c [ ! -e /etc/nsswitch.conf ] && echo 'hosts: files dns' > /etc/nsswitch.conf' returned a non-zero code: 1
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:
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.
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!
The text was updated successfully, but these errors were encountered: