Skip to content

Instantly share code, notes, and snippets.

@javierguerragiraldez
Created February 27, 2020 17:24
Show Gist options
  • Save javierguerragiraldez/674302b7171a0ed34b1e92d459ebeec0 to your computer and use it in GitHub Desktop.
Save javierguerragiraldez/674302b7171a0ed34b1e92d459ebeec0 to your computer and use it in GitHub Desktop.
dockerfiles for go plugins compiling tools. generic, Debian Buster-based
FROM golang:1.13
LABEL maintainer="Kong Core Team <[email protected]>"
RUN go get github.com/Kong/go-pluginserver
VOLUME /plugins
WORKDIR /plugins
RUN (echo '#!/bin/sh' && echo 'cp /go/bin/go-pluginserver /plugins') >> /usr/local/bin/get-server
RUN (echo '#!/bin/sh' && echo 'go build -buildmode=plugin "$@"') >> /usr/local/bin/build
RUN chmod a+x /usr/local/bin/*
# to copy go-pluginserver to current directory:
# docker run -it --rm -v `pwd`:/plugins gokit get-server
#
# to compile a plugin:
# docker run -it --rm -v `pwd`:/plugins gokit build go-log.go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment