-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
24 lines (23 loc) · 1.01 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
FROM golang:alpine AS plugin-build
COPY plugins /tmp/plugins
WORKDIR /tmp/plugins
RUN mkdir /plugins
RUN for d in */ ; do echo "Bulding plugin in $d"; cd $d; go mod download -x -json; go build -x -v -o /plugins/ -x . ; echo "Built plugin in $d"; cd ../; done
RUN ls /plugins
FROM kong:alpine
USER root
COPY --from=plugin-build /plugins /usr/local/bin/
RUN chown kong:kong /usr/local/bin/oidc
ENV KONG_PLUGINSERVER_NAMES=oidc
ENV KONG_PLUGINSERVER_OIDC_START_CMD="/usr/local/bin/oidc"
ENV KONG_PLUGINSERVER_OIDC_SOCKET="/usr/local/kong/oidc.socket"
ENV KONG_PLUGINSERVER_OIDC_QUERY_CMD="/usr/local/bin/oidc -dump"
ENV KONG_PROXY_LISTEN="0.0.0.0:8000 reuseport backlog=16384"
ENV KONG_ADMIN_LISTEN="0.0.0.0:8001 reuseport backlog=16384"
ENV KONG_GUI_LISTEN="0.0.0.0:8002"
ENV KONG_PLUGINS=bundled,oidc
ENV KONG_PROXY_ACCESS_LOG=/dev/stdout
ENV KONG_ADMIN_ACCESS_LOG=/dev/stdout
ENV KONG_PROXY_ERROR_LOG=/dev/stderr
ENV KONG_ADMIN_ERROR_LOG=/dev/stderr
LABEL org.opencontainers.image.source="https://github.com/wisdom-oss/api-gateway"