github.com/craicoverflow/tyk@v2.9.6-rc3+incompatible/images/README.md (about) 1 # build-env 2 3 Docker environment used to build official images and plugins. 4 5 This is the base image that will slowly be used in all our builds. It 6 is not capable of handling i386 or arm64 builds. Those builds are 7 handled by installing additional components in the environment section 8 of the pipeline. 9 10 This image will need to be updated only when upgrading the go version 11 or if some system dependencies for building change. This image is 12 mainly used internally at Tyk for CD pipelines. 13 14 # plugin-compiler 15 16 The usecase is that you have a plugin (probably Go) that you require 17 to be built. 18 19 Navigate to where your plugin is and build using a docker volume to 20 mount your code into the image. Since the vendor directory needs to be 21 identical between the gateway build and the plugin build, this means 22 that you should pull the version of this image corresponding to the 23 gateway version you are using. 24 25 This also implies that if your plugin has vendored modules that are 26 [also used by Tyk 27 gateway](https://github.com/TykTechnologies/tyk/tree/master/vendor) 28 then your module will be overridden by the version that Tyk uses. 29 30 ``` shell 31 cd ${GOPATH}/src/tyk-plugin 32 docker run -v `pwd`:/go/src/plugin-build plugin-build pre 33 ``` 34 35 You will find a `pre.so` in the current directory which is the file 36 that goes into the API definition 37 38 ## Building the image 39 40 The image is built automatically by [Github 41 Action](https://github.com/TykTechnologies/tyk/actions?query=workflow%3A%22Go+plugin+compiler). 42 There was a [change in paths in 43 v2.9.4.1](https://tyk.io/docs/plugins/supported-languages/golang/). 44 45 This will build the image that will be used in the plugin build 46 step. This section is for only for informational purposes. 47 48 In this directory of the repo: 49 50 ``` shell 51 % docker build --build-arg TYK_GW_TAG=v2.8.4 -t tykio/tyk-plugin-compiler:v2.8.4 plugin-compiler 52 % docker push tykio/tyk-plugin-compiler:v2.8.4 53 ``` 54 55 TYK_GW_TAG refers to the _tag_ in github corresponding to a released 56 version.