You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@answer.apache.org by li...@apache.org on 2024/04/11 09:00:55 UTC

(incubator-answer-website) branch main updated: docs(plugin): update plugin dockerfile

This is an automated email from the ASF dual-hosted git repository.

linkinstar pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-answer-website.git


The following commit(s) were added to refs/heads/main by this push:
     new 4f33af14 docs(plugin): update plugin dockerfile
4f33af14 is described below

commit 4f33af147f5d47784bac0800a57e062a47820ef8
Author: LinkinStars <li...@foxmail.com>
AuthorDate: Thu Apr 11 16:30:55 2024 +0800

    docs(plugin): update plugin dockerfile
---
 docs/guides/plugins.md | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/docs/guides/plugins.md b/docs/guides/plugins.md
index 113a45bf..ffdccbd9 100644
--- a/docs/guides/plugins.md
+++ b/docs/guides/plugins.md
@@ -90,6 +90,10 @@ $ ./new_answer plugin
 ```dockerfile  title="Dockerfile"
 FROM apache/answer as answer-builder
 
+FROM golang:1.19-alpine AS golang-builder
+
+COPY --from=answer-builder /usr/bin/answer /usr/bin/answer
+
 RUN apk --no-cache add \
     build-base git bash nodejs npm go && \
     npm install -g pnpm
@@ -120,7 +124,7 @@ RUN apk update \
     && ln -sf /usr/share/zoneinfo/${TIMEZONE} /etc/localtime \
     && echo "${TIMEZONE}" > /etc/timezone
 
-COPY --from=answer-builder /usr/bin/new_answer /usr/bin/answer
+COPY --from=golang-builder /usr/bin/new_answer /usr/bin/answer
 COPY --from=answer-builder /data /data
 COPY --from=answer-builder /entrypoint.sh /entrypoint.sh
 RUN chmod 755 /entrypoint.sh