This is an automated email from the ASF dual-hosted git repository.
bzp2010 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix-go-plugin-runner.git
The following commit(s) were added to refs/heads/master by this push:
new d6805db docs: add container build guide (#104)
d6805db is described below
commit d6805db1083d1958ccc0d1fb1c0d015dc6d64d15
Author: Zeping Bai <[email protected]>
AuthorDate: Tue Sep 13 13:38:02 2022 +0800
docs: add container build guide (#104)
---
docs/en/latest/getting-started.md | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/docs/en/latest/getting-started.md
b/docs/en/latest/getting-started.md
index c04ce19..093de73 100644
--- a/docs/en/latest/getting-started.md
+++ b/docs/en/latest/getting-started.md
@@ -259,6 +259,8 @@ We can see that the interface returns hello and does not
access anything upstrea
### Setting up APISIX (running)
+#### Setting up directly
+
Here's an example of go-runner, you just need to configure the command line to
run it inside ext-plugin:
```
@@ -270,3 +272,27 @@ ext-plugin:
APISIX will treat the plugin runner as a child process of its own, managing
its entire lifecycle.
APISIX will automatically assign a unix socket address for the runner to
listen to when it starts. environment variables do not need to be set manually.
+
+#### Setting up in container
+
+First you need to prepare the go-runner binary. Use this command:
+
+```shell
+make build
+```
+
+:::note
+When you use a Linux distribution such as Alpine Linux that is not based on
standard glibc, you must turn off Golang's CGO support via the `CGO_ENABLED=0`
environment variable to avoid libc ABI incompatibilities.
+
+If you want to use CGO, then you must build the binaries using the Go compiler
and the C compiler in the same Linux distribution.
+:::
+
+Then you need to rebuild the container image to include the go-runner binary.
You can use the following Dockerfile:
+
+```
+FROM apache/apisix:2.15.0-debian
+
+COPY ./go-runner /usr/local/apisix-go-plugin-runner/go-runner
+```
+
+Finally, you can push and run your custom image, just configure the binary
path and commands in the configuration file via `ext-plugin.cmd` to start
APISIX with go plugin runner.