Skip to content

Commit

Permalink
Revert "chore/remove-nsswitch-hosts"
Browse files Browse the repository at this point in the history
This reverts commit 12b08de.
  • Loading branch information
aeneasr committed Jan 11, 2025
1 parent de90d0b commit a9930c0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .docker/Dockerfile-alpine
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ RUN addgroup -S ory; \

COPY hydra /usr/bin/hydra

# set up nsswitch.conf for Go's "netgo" implementation
# - https://github.com/golang/go/blob/go1.9.1/src/net/conf.go#L194-L275
RUN echo 'hosts: files dns' > /etc/nsswitch.conf

# By creating the sqlite folder as the ory user, the mounted volume will be owned by ory:ory, which
# is required for read/write of SQLite.
RUN mkdir -p /var/lib/sqlite && \
Expand Down
4 changes: 4 additions & 0 deletions .docker/Dockerfile-scratch
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ FROM alpine:3.20
RUN apk upgrade --no-cache && \
apk add --no-cache --upgrade ca-certificates

# set up nsswitch.conf for Go's "netgo" implementation
# - https://github.com/golang/go/blob/go1.9.1/src/net/conf.go#L194-L275
RUN [ ! -e /etc/nsswitch.conf ] && echo 'hosts: files dns' > /etc/nsswitch.conf

RUN addgroup -S ory; \
adduser -S ory -G ory -D -h /home/ory -s /bin/nologin;

Expand Down

0 comments on commit a9930c0

Please sign in to comment.