2 Star 2 Fork 0

大佬金/kong网关之go插件开发

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
Dockerfile 806 Bytes
一键复制 编辑 原始数据 按行查看 历史
jijj@create80.com 提交于 2021-12-24 10:41 . 初始化
FROM golang:alpine as builder
# 更换alpine下载镜像
RUN sed -i 's!http://dl-cdn.alpinelinux.org/!https://mirrors.ustc.edu.cn/!g' /etc/apk/repositories
RUN apk add --no-cache git gcc libc-dev curl
RUN mkdir /go-plugins
RUN go env -w GOPROXY=https://goproxy.cn,direct
RUN go env -w GOSUMDB=sum.golang.google.cn
RUN go env -w GO111MODULE=on
COPY ./go-hello.go /go-plugins/go-hello.go
RUN cd /go-plugins && go mod init kong-go-plugin && go get github.com/Kong/go-pdk && go mod tidy && go build go-hello.go
#####################
## Release image
#####################
FROM kong:2.7.0-alpine
# Copy Go files
COPY --from=builder /go-plugins/go-hello /usr/local/bin/
ENV KONG_PLUGINS=bundled,go-hello
ENV KONG_PLUGINSERVER_NAMES=go-hello
ENV KONG_PLUGINSERVER_GO_HELLO_QUERY_CMD="go-hello -dump"
USER kong
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/BossKing/go-plug-in-of-kong-gateway.git
git@gitee.com:BossKing/go-plug-in-of-kong-gateway.git
BossKing
go-plug-in-of-kong-gateway
kong网关之go插件开发
master

搜索帮助

23e8dbc6 1850385 7e0993f3 1850385