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

apisix-dashboard DockerFile build fail #2926

Open
Abd-elr4hman opened this issue Feb 7, 2024 · 7 comments
Open

apisix-dashboard DockerFile build fail #2926

Abd-elr4hman opened this issue Feb 7, 2024 · 7 comments
Labels
bug Something isn't working

Comments

@Abd-elr4hman
Copy link

Issue description

I am following the Rebuild Docker image from docs to build the apisix dashboard image.

I made sure I have the prerequisites installed:

  • docker
  • etcd 3.4.0 +

when i run the command:
docker build -t apisix-dashboard:dev.
i get the error message:
ERROR: failed to solve: process "/bin/sh -c if [ \"$ENABLE_PROXY\" = \"true\" ] ; then yarn config set registry https://registry.npmmirror.com/ ; fi && yarn install && yarn build" did not complete successfully: exit code: 1

Expected behavior

for the docker image to finish building.

How to Reproduce

  1. clone the apisix-dashboard repo:
    git clone https://github.com/apache/apisix-dashboard.git
  2. cd into apisix-dashboard
    cd apisix-dashboard
  3. run the command:
    docker build -t apisix-dashboard:dev .

Screenshots

Screenshot 2024-02-07 at 1 55 53 PM Screenshot 2024-02-07 at 1 46 55 PM

Environment

  • OS (cmd: uname -a): macOS ventura 13.0.1
  • etcd version, if have (cmd: run etcd --version): 3.5.12

Additional context

No response

@Abd-elr4hman Abd-elr4hman added the bug Something isn't working label Feb 7, 2024
@zll600
Copy link
Contributor

zll600 commented Feb 13, 2024

@Abd-elr4hman Could you give us more error log?

@Abd-elr4hman
Copy link
Author

 > [fe-builder 5/5] RUN if [ "false" = "true" ] ; then yarn config set registry https://registry.npmmirror.com/ ; fi     && yarn install     && yarn build:
0.453 yarn install v1.22.19
0.671 [1/5] Validating package.json...
0.677 [2/5] Resolving packages...
2.466 [3/5] Fetching packages...
168.5 [4/5] Linking dependencies...
168.5 warning " > @rjsf/antd@2.2.0" has unmet peer dependency "@babel/runtime-corejs2@^7.10.3".
168.5 warning " > @rjsf/antd@2.2.0" has unmet peer dependency "antd-dayjs-webpack-plugin@1.0.0".
168.5 warning " > @rjsf/antd@2.2.0" has unmet peer dependency "core-js@^2.5.7".
168.5 warning "antd > rc-picker@2.5.10" has incorrect peer dependency "dayjs@^1.8.30".
168.5 warning " > styled-components@5.2.1" has unmet peer dependency "react-is@>= 16.8.0".
168.6 warning " > @4tw/cypress-drag-drop@1.6.0" has incorrect peer dependency "cypress@^2.1.0 || ^3.1.0 || ^4.0.0 || ^5.0.0 || ^6.0.0".
168.6 warning "@cypress/code-coverage > @cypress/webpack-preprocessor@5.12.1" has unmet peer dependency "@babel/core@^7.0.1".
168.6 warning "@cypress/code-coverage > @cypress/webpack-preprocessor@5.12.1" has unmet peer dependency "@babel/preset-env@^7.0.0".
168.6 warning "@cypress/code-coverage > @cypress/webpack-preprocessor@5.12.1" has unmet peer dependency "babel-loader@^8.0.2".
168.6 warning "@cypress/code-coverage > @cypress/webpack-preprocessor@5.12.1" has unmet peer dependency "webpack@^4 || ^5".
168.6 warning "@umijs/plugin-blocks > @umijs/block-sdk > @umijs/utils > @babel/register@7.12.10" has unmet peer dependency "@babel/core@^7.0.0-0".
168.6 warning "@umijs/plugin-blocks > @umijs/block-sdk > @umijs/types > @umijs/babel-preset-umi > @babel/plugin-proposal-class-properties@7.12.1" has unmet peer dependency "@babel/core@^7.0.0-0".
168.6 warning "@umijs/plugin-blocks > @umijs/block-sdk > @umijs/types > @umijs/babel-preset-umi > @babel/plugin-proposal-decorators@7.12.1" has unmet peer dependency "@babel/core@^7.0.0-0".
168.6 warning "@umijs/plugin-blocks > @umijs/block-sdk > @umijs/types > @umijs/babel-preset-umi > @babel/plugin-proposal-do-expressions@7.12.1" has unmet peer dependency "@babel/core@^7.0.0-0".
168.6 warning "@umijs/plugin-blocks > @umijs/block-sdk > @umijs/types > @umijs/babel-preset-umi > @babel/plugin-proposal-export-default-from@7.12.1" has unmet peer dependency "@babel/core@^7.0.0-0".
168.6 warning "@umijs/plugin-blocks > @umijs/block-sdk > @umijs/types > @umijs/babel-preset-umi > @babel/plugin-proposal-function-bind@7.12.1" has unmet peer dependency "@babel/core@^7.0.0-0".
168.6 warning "@umijs/plugin-blocks > @umijs/block-sdk > @umijs/types > @umijs/babel-preset-umi > @babel/plugin-proposal-logical-assignment-operators@7.12.1" has unmet peer dependency "@babel/core@^7.0.0-0".
168.6 warning "@umijs/plugin-blocks > @umijs/block-sdk > @umijs/types > @umijs/babel-preset-umi > @babel/plugin-proposal-nullish-coalescing-operator@7.12.1" has unmet peer dependency "@babel/core@^7.0.0-0".
168.6 warning "@umijs/plugin-blocks > @umijs/block-sdk > @umijs/types > @umijs/babel-preset-umi > @babel/plugin-proposal-optional-chaining@7.12.1" has unmet peer dependency "@babel/core@^7.0.0-0".
168.6 warning "@umijs/plugin-blocks > @umijs/block-sdk > @umijs/types > @umijs/babel-preset-umi > @babel/plugin-proposal-pipeline-operator@7.12.1" has unmet peer dependency "@babel/core@^7.0.0-0".
168.6 warning "@umijs/plugin-blocks > @umijs/block-sdk > @umijs/types > @umijs/babel-preset-umi > @babel/plugin-syntax-top-level-await@7.12.1" has unmet peer dependency "@babel/core@^7.0.0-0".
168.6 warning "@umijs/plugin-blocks > @umijs/block-sdk > @umijs/types > @umijs/babel-preset-umi > @babel/plugin-transform-destructuring@7.12.1" has unmet peer dependency "@babel/core@^7.0.0-0".
168.6 warning "@umijs/plugin-blocks > @umijs/block-sdk > @umijs/types > @umijs/babel-preset-umi > @babel/plugin-transform-runtime@7.12.1" has unmet peer dependency "@babel/core@^7.0.0-0".
168.6 warning "@umijs/plugin-blocks > @umijs/block-sdk > @umijs/types > @umijs/babel-preset-umi > @babel/preset-env@7.12.1" has unmet peer dependency "@babel/core@^7.0.0-0".
168.6 warning "@umijs/plugin-blocks > @umijs/block-sdk > @umijs/types > @umijs/babel-preset-umi > @babel/preset-react@7.12.1" has unmet peer dependency "@babel/core@^7.0.0-0".
168.6 warning "@umijs/plugin-blocks > @umijs/block-sdk > @umijs/types > @umijs/babel-preset-umi > @babel/preset-typescript@7.12.1" has unmet peer dependency "@babel/core@^7.0.0-0".
168.6 warning "@umijs/plugin-blocks > @umijs/block-sdk > @umijs/types > @umijs/babel-preset-umi > @umijs/babel-plugin-auto-css-modules@3.3.11" has unmet peer dependency "@babel/core@^7.12.3".
168.6 warning "@umijs/plugin-blocks > @umijs/block-sdk > @umijs/types > @umijs/babel-preset-umi > @umijs/babel-plugin-import-to-await-require@3.3.11" has unmet peer dependency "@babel/core@^7.12.3".
168.6 warning "@umijs/plugin-blocks > @umijs/block-sdk > @umijs/types > @umijs/babel-preset-umi > babel-plugin-named-asset-import@0.3.7" has unmet peer dependency "@babel/core@^7.1.0".
168.6 warning "@umijs/plugin-blocks > @umijs/block-sdk > @umijs/types > @umijs/babel-preset-umi > @babel/plugin-proposal-do-expressions > @babel/plugin-syntax-do-expressions@7.12.13" has unmet peer dependency "@babel/core@^7.0.0-0".
168.6 warning "@umijs/plugin-blocks > @umijs/block-sdk > @umijs/types > @umijs/babel-preset-umi > @babel/plugin-proposal-export-default-from > @babel/plugin-syntax-export-default-from@7.12.13" has unmet peer dependency "@babel/core@^7.0.0-0".
168.6 warning "@umijs/plugin-blocks > @umijs/block-sdk > @umijs/types > @umijs/babel-preset-umi > @babel/plugin-proposal-function-bind > @babel/plugin-syntax-function-bind@7.12.13" has unmet peer dependency "@babel/core@^7.0.0-0".
168.6 warning "@umijs/plugin-blocks > @umijs/block-sdk > @umijs/types > @umijs/babel-preset-umi > @babel/plugin-proposal-pipeline-operator > @babel/plugin-syntax-pipeline-operator@7.12.13" has unmet peer dependency "@babel/core@^7.0.0-0".
168.6 warning "@umijs/plugin-blocks > @umijs/block-sdk > @umijs/types > @umijs/babel-preset-umi > @babel/preset-react > @babel/plugin-transform-react-jsx-self@7.12.13" has unmet peer dependency "@babel/core@^7.0.0-0".
168.6 warning "@umijs/plugin-blocks > @umijs/block-sdk > @umijs/types > @umijs/babel-preset-umi > @babel/preset-react > @babel/plugin-transform-react-jsx-source@7.12.13" has unmet peer dependency "@babel/core@^7.0.0-0".
168.6 warning "@umijs/plugin-esbuild > esbuild-loader@2.6.3" has unmet peer dependency "webpack@^4.40.0 || ^5.0.0".
168.6 warning "@umijs/preset-react > @umijs/plugin-dva > babel-plugin-dva-hmr@0.4.2" has unmet peer dependency "redbox-react@1.x".
168.6 warning "@umijs/preset-react > @umijs/plugin-dva > dva-loading@3.0.22" has unmet peer dependency "dva-core@^1.1.0 | ^1.5.0-0 | ^1.6.0-0".
168.6 warning "@umijs/preset-react > @umijs/plugin-dva > dva > connected-react-router@6.5.2" has unmet peer dependency "react-router@^4.3.1 || ^5.0.0".
284.8 [5/5] Building fresh packages...
366.1 $ umi g tmp
367.2 { dev: undefined, test: undefined }
369.2 { dev: undefined, test: undefined }
370.4 $ cd .. && husky install web/.husky
370.5 husky - not a Git repository, skipping hooks installation
370.5 Done in 370.03s.
370.8 yarn run v1.22.19
370.8 $ yarn copy-folder monaco-editor ./public/ && NODE_OPTIONS=--max_old_space_size=4096 umi build
371.1 $ node --experimental-modules copy-folder.mjs monaco-editor ./public/
373.6 { dev: undefined, test: undefined }
375.5 { dev: undefined, test: undefined }
377.2 ℹ Compiling Webpack
378.7 Browserslist: caniuse-lite is outdated. Please run:
378.7 npx browserslist@latest --update-db
378.7 
378.7 Why you should do it regularly:
378.7 https://github.com/browserslist/browserslist#browsers-data-updating
383.7 Browserslist: caniuse-lite is outdated. Please run:
383.7 npx browserslist@latest --update-db
383.7 
383.7 Why you should do it regularly:
383.7 https://github.com/browserslist/browserslist#browsers-data-updating
616.3 Browserslist: caniuse-lite is outdated. Please run:
616.3 npx browserslist@latest --update-db
616.3 
616.3 Why you should do it regularly:
616.3 https://github.com/browserslist/browserslist#browsers-data-updating
857.3 error Command failed with signal "SIGKILL".
857.3 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
------
Dockerfile:48
--------------------
  47 |     
  48 | >>> RUN if [ "$ENABLE_PROXY" = "true" ] ; then yarn config set registry https://registry.npmmirror.com/ ; fi \
  49 | >>>     && yarn install \
  50 | >>>     && yarn build
  51 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c if [ \"$ENABLE_PROXY\" = \"true\" ] ; then yarn config set registry https://registry.npmmirror.com/ ; fi     && yarn install     && yarn build" did not complete successfully: exit code: 1```

@bravonaut
Copy link

bravonaut commented Feb 27, 2024

@zll600
I ran into the same exit code on the same step when building with the dockerfile provided from the all-in-one folders.
I do get a bit more info as the cert for a dependency is expired. Error persists with ENABLE_PROXY as true and false.

image

Any idea how to get around this?

@zll600
Copy link
Contributor

zll600 commented Feb 28, 2024

@bravonaut I think this problem should be fixed by #2918. So could you use https://github.com/apache/apisix-dashboard/blob/master/Dockerfile to have a try?

@zll600
Copy link
Contributor

zll600 commented Feb 28, 2024

@Abd-elr4hman I can not reproduce your problem.

  1. git clone https://github.com/apache/apisix-dashboard.git
  2. cd apisix-dashboard(use latest master)
  3. docker build -t apisix-dashboard:dev .

@bravonaut
Copy link

@zll600 using the dockerfile you linked, both with proxy on or off, i am now getting the exact same output as @Abd-elr4hman

Following the build more closely, I cannot figure out what exactly is causing the issue, but it is definitely in the build step of the frontend. I've also managed to build the frontend with the same version of node and yarn as defined in the dockerfile in an attempt to find the source of the problem.

Tying into what I said earlier, I was wrongfully referring to the all-in-one folder of apisix-docker, but, assuming the docker build works fine, what is the reason that a patch has not been released? There was clearly an issue when building a docker image with the dockerfile in 3.0.1 vs current master.

@zll600
Copy link
Contributor

zll600 commented Mar 17, 2024

@bravonaut I fix a build problem in master. It is not backport to release/3.0 #2918

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