TykTechnologies / tyk-gateway-docker

Docker compose deployment to run Tyk OSS Gateway
96 stars 80 forks source link

Fixes Python dispatcher failing to initialise (#35) #36

Closed excieve closed 4 years ago

excieve commented 4 years ago

Since v2.9.0 Python dispatcher is automatically searching for libpython and links to it dynamically. In order for auto-detection to work it fist searches for "python3-config" executable, which knows locations of libraries and other files usually called for development purposes. For this reason it's not a part of "libpython" packages, but rather "libpython-dev" packages. So this package needs to be installed too, which indeed solves the issue, however it also brings 110MB of overhead along with its dependencies.

In order to combat this, we manually delete all the space consuming files that are not really needed to execute this container in a meaningful way. This keeps the overhead to 1MB. Better solution requires changes in Tyk gateway, so that's hopefully temporary.

Another issue found is the "grpcio" Python package doesn't depend on the "protobuf" package anymore, but it's required by the gateway's Python bindings — plugins won't work without it. So this installs the "protobuf" package explicitly now, which adds 1MB more (compared to original "v2.9.2" image).

buger commented 4 years ago

Nice solution!