Created
February 27, 2020 17:26
-
-
Save javierguerragiraldez/cd10ac2a56357b448161dad1817ad178 to your computer and use it in GitHub Desktop.
go plugin compiler, Alpine-based
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM golang:1.13.4-alpine | |
LABEL maintainer="Kong Core Team <[email protected]>" | |
RUN apk update && \ | |
apk upgrade && \ | |
apk add git \ | |
bash \ | |
gcc \ | |
musl-dev \ | |
openssl \ | |
go | |
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