You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/11/25 08:48:25 UTC

[GitHub] [apisix-dashboard] GhangZh opened a new issue #2223: request help :apisix-dashboard Dockerfile and build.sh error

GhangZh opened a new issue #2223:
URL: https://github.com/apache/apisix-dashboard/issues/2223


   ### Issue description
   
   With the current dockerfile I have no problem playing the image on mac, but running the image in linux will report an error, playing the image in linux will report an error
   
   ### Expected behavior
   
   
   
   ![image](https://user-images.githubusercontent.com/92301646/143407707-812b95f7-e974-4fb8-a5ea-a496aa789e51.png)
   Dockerfile
   ```bash
   FROM alpine:latest as pre-build
   
   ARG APISIX_DASHBOARD_VERSION=master
   
   RUN set -x \
       && apk add --no-cache --virtual .builddeps git \
       && git config --global http.version HTTP/1.1 \
       && git clone https://github.com/apache/apisix-dashboard.git /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
   
   ARG ENABLE_PROXY=false
   
   WORKDIR /usr/local/apisix-dashboard
   
   COPY --from=pre-build /usr/local/apisix-dashboard .
   
   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
   
   FROM node:14-alpine as fe-builder
   
   ARG ENABLE_PROXY=false
   
   WORKDIR /usr/local/apisix-dashboard
   
   COPY --from=pre-build /usr/local/apisix-dashboard .
   
   WORKDIR /usr/local/apisix-dashboard/web
   
   RUN if [ "$ENABLE_PROXY" = "true" ] ; then yarn config set registry https://registry.npm.taobao.org/ ; fi \
       && yarn install \
       && yarn build
   
   FROM centos:7 as prod
   
   ARG ENABLE_PROXY=false
   
   RUN if [ "$ENABLE_PROXY" = "true" ] ; then sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories ; fi
   
   WORKDIR /usr/local/apisix-dashboard
   
   COPY --from=api-builder /usr/local/apisix-dashboard/output/ ./
   
   COPY --from=fe-builder /usr/local/apisix-dashboard/output/ ./
   
   RUN mkdir logs
   
   EXPOSE 9000
   
   CMD [ "/usr/local/apisix-dashboard/manager-api" ]
   ```
   
   ### How to Reproduce
   
   Build the apisix-dashboard centos image with the repository Dockerfile and then update the image pod will not start, but on the linux machine, the image will say No Such file just like
   
   ### Screenshots
   
   _No response_
   
   ### Environment
   
   - apisix version (cmd: `apisix version`):
   - OS (cmd: `uname -a`):Linux
   - OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`):
   - etcd version, if have (cmd: run `etcd --version`):
   - apisix-dashboard version, if have:2.9.0
   - Browser version, if have:
   
   
   ### Additional context
   
   _No response_


-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] zaunist commented on issue #2223: request help :apisix-dashboard Dockerfile and build.sh error

Posted by GitBox <gi...@apache.org>.
zaunist commented on issue #2223:
URL: https://github.com/apache/apisix-dashboard/issues/2223#issuecomment-980840099


   Hi, @GhangZh . I build dashboard with follow Dockerfile success. 
   You can start up etcd locally, and replace etcd endpoint, then run the
   ```
   docker run -p 9000:9000 <apisix-dashboard-tag>
   ```
   ```
   FROM alpine:latest as pre-build
   
   ARG APISIX_DASHBOARD_VERSION=master
   
   RUN set -x \
       && apk add --no-cache --virtual .builddeps git \
       && git config --global http.version HTTP/1.1 \
       && git clone https://github.com/apache/apisix-dashboard.git /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
   
   ARG ENABLE_PROXY=false
   
   WORKDIR /usr/local/apisix-dashboard
   
   COPY --from=pre-build /usr/local/apisix-dashboard .
   
   RUN if [ "$ENABLE_PROXY" = "true" ] ; then go env -w GOPROXY=https://goproxy.io,direct ; fi \
       && go env -w GO111MODULE=on \
       && sed -i 's/127.0.0.1:2379/docker.for.mac.host.internal:2379/' ./api/conf/conf.yaml \
       && sed -i 's@127.0.0.1@0.0.0.0/0@' ./api/conf/conf.yaml \
       && CGO_ENABLED=0 ./api/build.sh
   
   FROM node:14-alpine as fe-builder
   
   ARG ENABLE_PROXY=false
   
   WORKDIR /usr/local/apisix-dashboard
   
   COPY --from=pre-build /usr/local/apisix-dashboard .
   
   WORKDIR /usr/local/apisix-dashboard/web
   
   RUN if [ "$ENABLE_PROXY" = "true" ] ; then yarn config set registry https://registry.npm.taobao.org/ ; fi \
       && yarn install \
       && yarn build
   
   FROM centos:7 as prod
   
   ARG ENABLE_PROXY=false
   
   RUN if [ "$ENABLE_PROXY" = "true" ] ; then sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories ; fi
   
   WORKDIR /usr/local/apisix-dashboard
   
   COPY --from=api-builder /usr/local/apisix-dashboard/output/ ./
   
   COPY --from=fe-builder /usr/local/apisix-dashboard/output/ ./
   
   RUN mkdir logs
   
   EXPOSE 9000
   
   CMD [ "/usr/local/apisix-dashboard/manager-api" ]
   
   ```
   
   ![image](https://user-images.githubusercontent.com/38528079/143730053-f03aa69f-0eb3-4023-a1eb-3463143d75cb.png)
   
   ![image](https://user-images.githubusercontent.com/38528079/143730060-769a39db-e089-4bfc-a5bf-a6083825e263.png)
   
   


-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] GhangZh closed issue #2223: request help :apisix-dashboard Dockerfile and build.sh error

Posted by GitBox <gi...@apache.org>.
GhangZh closed issue #2223:
URL: https://github.com/apache/apisix-dashboard/issues/2223


   


-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] GhangZh commented on issue #2223: request help :apisix-dashboard Dockerfile and build.sh error

Posted by GitBox <gi...@apache.org>.
GhangZh commented on issue #2223:
URL: https://github.com/apache/apisix-dashboard/issues/2223#issuecomment-979110618


   I still have this problem with this dockerfile


-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] GhangZh commented on issue #2223: request help :apisix-dashboard Dockerfile and build.sh error

Posted by GitBox <gi...@apache.org>.
GhangZh commented on issue #2223:
URL: https://github.com/apache/apisix-dashboard/issues/2223#issuecomment-988557283


   > Hi @GhangZh, may I know if this issue gets resolved?
   
   Yes, thank you both for your help @juzhiyuan @zaunist , then I'll turn off this issue


-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] GhangZh commented on issue #2223: request help :apisix-dashboard Dockerfile and build.sh error

Posted by GitBox <gi...@apache.org>.
GhangZh commented on issue #2223:
URL: https://github.com/apache/apisix-dashboard/issues/2223#issuecomment-979659715


   > Hi, @GhangZh , It is recommended to use make build to compile apisix-dashboard. `make build` will build backend and frontend to manager-api in `output` directory
   > 
   > ```
   > FROM golang:1.14 as api-builder
   > RUN git clone https://github.com.cnpmjs.org/apache/apisix-dashboard.git  /usr/local/apisix-dashboard
   > WORKDIR /usr/local/apisix-dashboard
   > RUN   make build && cd ./output && ./manager-api
   > ```
   
   Hi @zaunist I still get the same error after use this dockerfile, can apisix provide the centos image of dashbaord, I have built the ingress-controller myself successful, but the dashboard has been unsuccessful, thanks.


-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] GhangZh edited a comment on issue #2223: request help :apisix-dashboard Dockerfile and build.sh error

Posted by GitBox <gi...@apache.org>.
GhangZh edited a comment on issue #2223:
URL: https://github.com/apache/apisix-dashboard/issues/2223#issuecomment-979110618


   I still have the same problem with this dockerfile
   ```bash
   FROM golang:1.14 as api-builder
   RUN git clone https://github.com.cnpmjs.org/apache/apisix-dashboard.git  /usr/local/apisix-dashboard
   WORKDIR /usr/local/apisix-dashboard
   RUN   ./api/build.sh
   ```
   
   ![image](https://user-images.githubusercontent.com/92301646/143432690-bd187445-0a87-4a4d-94ee-12923589226d.png)
   


-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] zaunist commented on issue #2223: request help :apisix-dashboard Dockerfile and build.sh error

Posted by GitBox <gi...@apache.org>.
zaunist commented on issue #2223:
URL: https://github.com/apache/apisix-dashboard/issues/2223#issuecomment-979366433


   Hi, @GhangZh , It is recommended to use make build to compile apisix-dashboard. `make build` will build backend and frontend to manager-api in `output` directory
   ```
   FROM golang:1.14 as api-builder
   RUN git clone https://github.com.cnpmjs.org/apache/apisix-dashboard.git  /usr/local/apisix-dashboard
   WORKDIR /usr/local/apisix-dashboard
   RUN   make build && cd ./output && ./manager-api
   ```


-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] zaunist commented on issue #2223: request help :apisix-dashboard Dockerfile and build.sh error

Posted by GitBox <gi...@apache.org>.
zaunist commented on issue #2223:
URL: https://github.com/apache/apisix-dashboard/issues/2223#issuecomment-979699187


   > Hi @zaunist I still get the same error after use this dockerfile, can apisix provide the centos image of dashbaord, I have built the ingress-controller myself successful, but the dashboard has been unsuccessful, thanks.
   > 
   > > Hi, @GhangZh , It is recommended to use make build to compile apisix-dashboard. `make build` will build backend and frontend to manager-api in `output` directory
   > > ```
   > > FROM golang:1.14 as api-builder
   > > RUN git clone https://github.com.cnpmjs.org/apache/apisix-dashboard.git  /usr/local/apisix-dashboard
   > > WORKDIR /usr/local/apisix-dashboard
   > > RUN   make build && cd ./output && ./manager-api
   > > ```
   
   I will check the dockerfile later, and then give you advice.


-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] GhangZh removed a comment on issue #2223: request help :apisix-dashboard Dockerfile and build.sh error

Posted by GitBox <gi...@apache.org>.
GhangZh removed a comment on issue #2223:
URL: https://github.com/apache/apisix-dashboard/issues/2223#issuecomment-979727366


   > 
   
   Thanks,please check this Dockerfile
   ```bash
   FROM alpine:latest as pre-build
   
   ARG APISIX_DASHBOARD_VERSION=master
   
   RUN set -x \
       && apk add --no-cache --virtual .builddeps git \
       && git config --global http.version HTTP/1.1 \
       && git clone https://github.com/apache/apisix-dashboard.git /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
   
   ARG ENABLE_PROXY=false
   
   WORKDIR /usr/local/apisix-dashboard
   
   COPY --from=pre-build /usr/local/apisix-dashboard .
   
   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
   
   FROM node:14-alpine as fe-builder
   
   ARG ENABLE_PROXY=false
   
   WORKDIR /usr/local/apisix-dashboard
   
   COPY --from=pre-build /usr/local/apisix-dashboard .
   
   WORKDIR /usr/local/apisix-dashboard/web
   
   RUN if [ "$ENABLE_PROXY" = "true" ] ; then yarn config set registry https://registry.npm.taobao.org/ ; fi \
       && yarn install \
       && yarn build
   
   FROM centos:7 as prod
   
   ARG ENABLE_PROXY=false
   
   RUN if [ "$ENABLE_PROXY" = "true" ] ; then sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories ; fi
   
   WORKDIR /usr/local/apisix-dashboard
   
   COPY --from=api-builder /usr/local/apisix-dashboard/output/ ./
   
   COPY --from=fe-builder /usr/local/apisix-dashboard/output/ ./
   
   RUN mkdir logs
   
   EXPOSE 9000
   
   CMD [ "/usr/local/apisix-dashboard/manager-api" ]
   ```


-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] GhangZh commented on issue #2223: request help :apisix-dashboard Dockerfile and build.sh error

Posted by GitBox <gi...@apache.org>.
GhangZh commented on issue #2223:
URL: https://github.com/apache/apisix-dashboard/issues/2223#issuecomment-979727366


   > 
   
   Thanks,please check this Dockerfile
   ```bash
   FROM alpine:latest as pre-build
   
   ARG APISIX_DASHBOARD_VERSION=master
   
   RUN set -x \
       && apk add --no-cache --virtual .builddeps git \
       && git config --global http.version HTTP/1.1 \
       && git clone https://github.com/apache/apisix-dashboard.git /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
   
   ARG ENABLE_PROXY=false
   
   WORKDIR /usr/local/apisix-dashboard
   
   COPY --from=pre-build /usr/local/apisix-dashboard .
   
   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
   
   FROM node:14-alpine as fe-builder
   
   ARG ENABLE_PROXY=false
   
   WORKDIR /usr/local/apisix-dashboard
   
   COPY --from=pre-build /usr/local/apisix-dashboard .
   
   WORKDIR /usr/local/apisix-dashboard/web
   
   RUN if [ "$ENABLE_PROXY" = "true" ] ; then yarn config set registry https://registry.npm.taobao.org/ ; fi \
       && yarn install \
       && yarn build
   
   FROM centos:7 as prod
   
   ARG ENABLE_PROXY=false
   
   RUN if [ "$ENABLE_PROXY" = "true" ] ; then sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories ; fi
   
   WORKDIR /usr/local/apisix-dashboard
   
   COPY --from=api-builder /usr/local/apisix-dashboard/output/ ./
   
   COPY --from=fe-builder /usr/local/apisix-dashboard/output/ ./
   
   RUN mkdir logs
   
   EXPOSE 9000
   
   CMD [ "/usr/local/apisix-dashboard/manager-api" ]
   ```


-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] juzhiyuan commented on issue #2223: request help :apisix-dashboard Dockerfile and build.sh error

Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on issue #2223:
URL: https://github.com/apache/apisix-dashboard/issues/2223#issuecomment-988454236


   Hi @GhangZh, may I know if this issue gets resolved?


-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] juzhiyuan commented on issue #2223: request help :apisix-dashboard Dockerfile and build.sh error

Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on issue #2223:
URL: https://github.com/apache/apisix-dashboard/issues/2223#issuecomment-989328788


   sure


-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] GhangZh edited a comment on issue #2223: request help :apisix-dashboard Dockerfile and build.sh error

Posted by GitBox <gi...@apache.org>.
GhangZh edited a comment on issue #2223:
URL: https://github.com/apache/apisix-dashboard/issues/2223#issuecomment-979110618


   I still have this problem with this dockerfile
   ```bash
   FROM golang:1.14 as api-builder
   RUN git clone https://github.com.cnpmjs.org/apache/apisix-dashboard.git  /usr/local/apisix-dashboard
   WORKDIR /usr/local/apisix-dashboard
   RUN   ./api/build.sh
   ```


-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] GhangZh edited a comment on issue #2223: request help :apisix-dashboard Dockerfile and build.sh error

Posted by GitBox <gi...@apache.org>.
GhangZh edited a comment on issue #2223:
URL: https://github.com/apache/apisix-dashboard/issues/2223#issuecomment-979659715


   Hi @zaunist I still get the same error after use this dockerfile, can apisix provide the centos image of dashbaord, I have built the ingress-controller myself successful, but the dashboard has been unsuccessful, thanks.
   > Hi, @GhangZh , It is recommended to use make build to compile apisix-dashboard. `make build` will build backend and frontend to manager-api in `output` directory
   > 
   > ```
   > FROM golang:1.14 as api-builder
   > RUN git clone https://github.com.cnpmjs.org/apache/apisix-dashboard.git  /usr/local/apisix-dashboard
   > WORKDIR /usr/local/apisix-dashboard
   > RUN   make build && cd ./output && ./manager-api
   > ```
   
   


-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org