apisix-dashboard icon indicating copy to clipboard operation
apisix-dashboard copied to clipboard

v2.0-rc2 Build docker image error.

Open Caelebs opened this issue 6 years ago • 10 comments

Please answer these questions before submitting your issue.

  • Why do you submit this issue?
  • [ ] Question or discussion
  • [x] Bug
  • [ ] Requirements
  • [ ] Feature or performance improvement
  • [ ] Other

Bug

  • Which version of Apache APISIX Dashboard, OS, and Browser?

Failed to build docker image based on the current v2.0-rc2 version. The error message is as follows

Step 13/17 : RUN  cd /go/manager-api/build-tools      && lua schema-sync.lua > /go/manager-api/schema.json      && cd /go/manager-api/      && rm -rf /go/manager-api/build-tools/
 ---> Running in 8e282779783e
lua: ./apisix/plugins/api-breaker.lua:25: attempt to index field 'shared' (a nil value)
stack traceback:
	./apisix/plugins/api-breaker.lua:25: in main chunk
	[C]: in function 'require'
	schema-sync.lua:128: in main chunk
	[C]: ?
The command '/bin/sh -c cd /go/manager-api/build-tools      && lua schema-sync.lua > /go/manager-api/schema.json      && cd /go/manager-api/      && rm -rf /go/manager-api/build-tools/' returned a non-zero code: 1

Commands used to build the image docker build -t apisix-manager-api:v2.0-rc2 . Dashboard-manager-api version v2.0-rc2

Caelebs avatar Oct 28 '20 09:10 Caelebs

I tried to modify the Dockerfile and change the apisix code download address to 2.0 release version, but new problems appeared in the build process. The content of my modification is as follows

RUN  wget https://github.com/apache/apisix/archive/2.0.zip \
     && apt-get update && apt-get install zip -y \
     && unzip 2.0.zip \
     && rm -rf /go/manager-api/build-tools/apisix/ \
     && mkdir -p /go/manager-api/build-tools/apisix \
     && mv ./apisix-2.0/apisix/* /go/manager-api/build-tools/apisix/

and the error message is no such file or directory

Step 12/17 : COPY --from=build-env /usr/share/zoneinfo/Hongkong /etc/localtime
 ---> Using cache
 ---> 874bd2476b2f
Step 13/17 : RUN  cd /go/manager-api/build-tools      && lua schema-sync.lua > /go/manager-api/schema.json      && cd /go/manager-api/      && rm -rf /go/manager-api/build-tools/
 ---> Running in 5b50cda236c4
Removing intermediate container 5b50cda236c4
 ---> 6c9e7905c54d
Step 14/17 : ADD ./dist /go/manager-api
ADD failed: stat /var/lib/docker/tmp/docker-builder690428283/dist: no such file or directory

@juzhiyuan

Caelebs avatar Oct 28 '20 09:10 Caelebs

It seems that there still have something wrong when deploying the dashboard with Docker, these issues should be fixed before 2.1 release.

juzhiyuan avatar Oct 28 '20 09:10 juzhiyuan

Before the 2.1 version is released, how should I modify the source code to build the manager-api docker image file? @juzhiyuan

Caelebs avatar Oct 29 '20 02:10 Caelebs

After discussions, we are going to fix this in 2.0 RC3, it will take no longer than 3 days.

juzhiyuan avatar Oct 29 '20 03:10 juzhiyuan

Deploy with Docker Compose is removed, and we are developing the new Dockerfile, so I will close this issue. The new Dockerfile will be added to RC3.

juzhiyuan avatar Oct 30 '20 02:10 juzhiyuan

When will the same problem be solved?

backnero avatar Nov 11 '20 06:11 backnero

same problem? could you please provide more info, like links or snapshots?

juzhiyuan avatar Nov 11 '20 06:11 juzhiyuan

[91mlua: ./apisix/plugins/api-breaker.lua:24: attempt to index field 'shared' (a nil value)

stack traceback:

 ./apisix/plugins/api-breaker.lua:24: in main chunk

 [C]: in function 'require'

 schema-sync.lua:128: in main chunk

 [C]: ?

The command '/bin/sh -c cd /go/manager-api/build-tools && lua schema-sync.lua > /go/manager-api/schema.json && cd /go/manager-api/ && rm -rf /go/manager-api/build-tools/' returned a non-zero code: 1

exit status 1

Run docker build failed.

BUILD FAILED exit status 1

clone from master branch

backnero avatar Nov 11 '20 07:11 backnero

emmm no, we are still under the v2.0 branch.

juzhiyuan avatar Nov 11 '20 09:11 juzhiyuan

Please follow this guide: https://github.com/apache/apisix-dashboard/blob/feat-docs/docs/deploy.zh-CN.md

$ git clone -b v2.0 https://github.com/apache/apisix-dashboard.git

juzhiyuan avatar Nov 11 '20 09:11 juzhiyuan