nic-chen commented on a change in pull request #254: URL: https://github.com/apache/apisix-docker/pull/254#discussion_r772773389
########## File path: dashboard/Dockerfile ########## @@ -14,29 +14,34 @@ # See the License for the specific language governing permissions and # limitations under the License. # -FROM alpine:latest as pre-build +ARG BUILDPLATFORM=amd64 -ARG APISIX_DASHBOARD_VERSION=release/2.9.0 +FROM --platform=$BUILDPLATFORM alpine:latest as pre-build + +ARG APISIX_DASHBOARD_VERSION=release/2.10 RUN set -x \ && apk add --no-cache --virtual .builddeps git \ && git clone https://github.com/apache/apisix-dashboard.git -b ${APISIX_DASHBOARD_VERSION} /usr/local/apisix-dashboard \ && cd /usr/local/apisix-dashboard && git clean -Xdf \ && rm -f ./.githash && git log --pretty=format:"%h" -1 > ./.githash -FROM golang:1.14 as api-builder +FROM --platform=$BUILDPLATFORM golang:1.14 as api-builder ARG ENABLE_PROXY=false WORKDIR /usr/local/apisix-dashboard COPY --from=pre-build /usr/local/apisix-dashboard . +ARG TARGETOS +ARG TARGETARCH + RUN if [ "$ENABLE_PROXY" = "true" ] ; then go env -w GOPROXY=https://goproxy.io,direct ; fi \ && go env -w GO111MODULE=on \ - && CGO_ENABLED=0 ./api/build.sh + && CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} ./api/build.sh Review comment: we could put `GOOS` and `GOARCH` into `build.sh` later. -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org