Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2.0-rc2 Build docker image error. #615

Closed
1 of 5 tasks
Caelebs opened this issue Oct 28, 2020 · 10 comments
Closed
1 of 5 tasks

v2.0-rc2 Build docker image error. #615

Caelebs opened this issue Oct 28, 2020 · 10 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@Caelebs
Copy link

Caelebs commented Oct 28, 2020

Please answer these questions before submitting your issue.

  • Why do you submit this issue?
  • Question or discussion
  • 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
Copy link
Author

Caelebs commented Oct 28, 2020

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

@juzhiyuan
Copy link
Member

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

@Caelebs
Copy link
Author

Caelebs commented Oct 29, 2020

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

@juzhiyuan
Copy link
Member

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

@juzhiyuan juzhiyuan self-assigned this Oct 29, 2020
@juzhiyuan juzhiyuan modified the milestones: 2.1, 2.0 Oct 29, 2020
@juzhiyuan
Copy link
Member

juzhiyuan commented Oct 30, 2020

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.

@backnero
Copy link

When will the same problem be solved?

@juzhiyuan
Copy link
Member

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

@backnero
Copy link

[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]: ?

�[0mThe 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

@juzhiyuan
Copy link
Member

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

@juzhiyuan
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants