Skip to content
This repository has been archived by the owner on Aug 26, 2021. It is now read-only.

fix(dns): /etc/hosts was ignored by traefik #75

Open
wants to merge 25 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions scratch/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ FROM scratch
COPY --from=traefik:v2.1.0-alpine /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=traefik:v2.1.0-alpine /usr/share/zoneinfo /usr/share/
COPY --from=traefik:v2.1.0-alpine /usr/local/bin/traefik /

## Fix nssswitch not looking at hosts file (See https://github.com/containous/traefik-library-image/pull/75)
kopax marked this conversation as resolved.
Show resolved Hide resolved
RUN [ ! -e /etc/nsswitch.conf ] && echo "hosts: files dns" > /etc/nsswitch.conf
kopax marked this conversation as resolved.
Show resolved Hide resolved

EXPOSE 80
VOLUME ["/tmp"]
Expand Down
3 changes: 3 additions & 0 deletions scratch/tmplv1.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ COPY --from=traefik:${VERSION}-alpine /etc/ssl/certs/ca-certificates.crt /etc/ss
COPY --from=traefik:${VERSION}-alpine /usr/share/zoneinfo /usr/share/
COPY --from=traefik:${VERSION}-alpine /usr/local/bin/traefik /

kopax marked this conversation as resolved.
Show resolved Hide resolved
## Fix nssswitch not looking at hosts file (See https://github.com/containous/traefik-library-image/pull/75)
kopax marked this conversation as resolved.
Show resolved Hide resolved
RUN [ ! -e /etc/nsswitch.conf ] && echo "hosts: files dns" > /etc/nsswitch.conf
kopax marked this conversation as resolved.
Show resolved Hide resolved

EXPOSE 80
VOLUME ["/tmp"]
ENTRYPOINT ["/traefik"]
Expand Down
3 changes: 3 additions & 0 deletions scratch/tmplv2.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ COPY --from=traefik:${VERSION}-alpine /etc/ssl/certs/ca-certificates.crt /etc/ss
COPY --from=traefik:${VERSION}-alpine /usr/share/zoneinfo /usr/share/
COPY --from=traefik:${VERSION}-alpine /usr/local/bin/traefik /

kopax marked this conversation as resolved.
Show resolved Hide resolved
## Fix nssswitch not looking at hosts file (See https://github.com/containous/traefik-library-image/pull/75)
kopax marked this conversation as resolved.
Show resolved Hide resolved
RUN [ ! -e /etc/nsswitch.conf ] && echo "hosts: files dns" > /etc/nsswitch.conf
kopax marked this conversation as resolved.
Show resolved Hide resolved

EXPOSE 80
VOLUME ["/tmp"]
ENTRYPOINT ["/traefik"]
Expand Down