Skip to content

Commit 12effa1

Browse files
committed
Dockerfile: add nsswitch.conf, update go and dep
1 parent c6cb5ea commit 12effa1

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

Dockerfile

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
FROM golang:1.12-alpine
1+
FROM golang:1.13-alpine
22

33
RUN apk update && apk add git
44
RUN wget -O /usr/local/bin/dep \
5-
https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-amd64 \
5+
https://github.com/golang/dep/releases/download/v0.5.4/dep-linux-amd64 \
66
&& chmod a+x /usr/local/bin/dep
77

88
WORKDIR $GOPATH/src/github.com/ploxiln/oauth2_proxy/
@@ -14,7 +14,13 @@ RUN CGO_ENABLED=0 go build -ldflags="-s -w" -o /usr/local/bin/oauth2_proxy
1414
FROM busybox
1515

1616
EXPOSE 4180
17+
18+
# set up nsswitch.conf for Go's "netgo" implementation
19+
# https://github.com/golang/go/issues/35305
20+
RUN [ ! -e /etc/nsswitch.conf ] && echo 'hosts: files dns' > /etc/nsswitch.conf
21+
1722
COPY --from=0 /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
1823
COPY --from=0 /usr/local/bin/oauth2_proxy /usr/local/bin/
24+
1925
USER www-data
2026
CMD ["oauth2_proxy"]

0 commit comments

Comments
 (0)