Perondas opened a new issue, #252:
URL: https://github.com/apache/incubator-answer-plugins/issues/252

   When building the following dockerfile:
   
   ```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 [email protected]
   
   RUN answer build \
       --with github.com/apache/incubator-answer-plugins/connector-basic \
       --with github.com/apache/incubator-answer-plugins/storage-s3 \
       --with github.com/apache/incubator-answer-plugins/search-elasticsearch \
       --with github.com/apache/incubator-answer-plugins/user-center-slack  \
       --output /usr/bin/new_answer
   
   FROM alpine
   LABEL maintainer="[email protected]"
   
   ARG TIMEZONE
   ENV TIMEZONE=${TIMEZONE:-"Asia/Shanghai"}
   
   RUN apk update \
       && apk --no-cache add \
           bash \
           ca-certificates \
           curl \
           dumb-init \
           gettext \
           openssh \
           sqlite \
           gnupg \
           tzdata \
       && ln -sf /usr/share/zoneinfo/${TIMEZONE} /etc/localtime \
       && echo "${TIMEZONE}" > /etc/timezone
   
   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
   
   VOLUME /data
   EXPOSE 80
   ENTRYPOINT ["/entrypoint.sh"]
   ```
   
   I receive the following error message:
   ```shell
   #12 373.2 [go build -ldflags -X 
github.com/apache/incubator-answer/cmd.Version=1.4.0 -X 
github.com/apache/incubator-answer/cmd.Revision=465f4bf -X 
github.com/apache/incubator-answer/cmd.Time=1727056127 -o /usr/bin/new_answer .]
   #12 373.4 vendor/github.com/pelletier/go-toml/v2/marshaler.go:11:2: cannot 
find package "." in:
   #12 373.4    /go/answer_build66821811/vendor/slices
   #12 373.4 build failed exit status 1
   ``` 
   
   omitting the line:
   ```shell
       --with github.com/apache/incubator-answer-plugins/user-center-slack  \
   ```
   
   allows the build to run to completion.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to