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

Dockerfile is not building #25148

Closed
3 tasks done
hugosjoberg opened this issue Aug 31, 2023 · 2 comments
Closed
3 tasks done

Dockerfile is not building #25148

hugosjoberg opened this issue Aug 31, 2023 · 2 comments

Comments

@hugosjoberg
Copy link
Contributor

hugosjoberg commented Aug 31, 2023

A clear and concise description of what the bug is.

How to reproduce the bug

  1. Checkout 2.1.1.
  2. Run docker build . -t superset or DOCKER_BUILDKIT=0 docker build . -t superset if you are on mac

I get the following error:

 > [superset-node 7/9] RUN npm ci:
...
69.19 npm ERR! gyp ERR! find Python **********************************************************
69.19 npm ERR! gyp ERR! find Python You need to install the latest version of Python.
69.19 npm ERR! gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
69.19 npm ERR! gyp ERR! find Python you can try one of the following options:
69.19 npm ERR! gyp ERR! find Python - Use the switch --python="/path/to/pythonexecutable"
69.19 npm ERR! gyp ERR! find Python   (accepted by both node-gyp and npm)
69.19 npm ERR! gyp ERR! find Python - Set the environment variable PYTHON
69.19 npm ERR! gyp ERR! find Python - Set the npm configuration variable python:
69.19 npm ERR! gyp ERR! find Python   npm config set python "/path/to/pythonexecutable"
69.19 npm ERR! gyp ERR! find Python For more information consult the documentation at:
69.19 npm ERR! gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
69.19 npm ERR! gyp ERR! find Python **********************************************************
69.19 npm ERR! gyp ERR! find Python
69.19 npm ERR! gyp ERR! configure error

This and several upcoming errors was solved by adding missing packages to the docker-file:

RUN apt-get update
RUN apt-get install -y python3 make gcc g++

Then I end up with the following:

 => [superset-node 10/11] COPY ./superset-frontend .                                                                                                                                                                                                                                                                                                                                                                                1.0s
 => ERROR [superset-node 11/11] RUN npm run build
...
138.7 / Processing: src/views/CRUD/alert/AlertReportModal.test.tsx
138.9 - Processing: src/views/CRUD/alert/AlertReportModal.tsx
------
Dockerfile:45
--------------------
  43 |
  44 |     # This seems to be the most expensive step
  45 | >>> RUN npm run ${BUILD_CMD}
  46 |
  47 |     ######################################################################
--------------------
ERROR: failed to solve: process "/bin/sh -c npm run ${BUILD_CMD}" did not complete successfully: exit code: 1

Expected results

I expect the docker image to build

Actual results

The docker image build fails

Screenshots

NA

Environment

(please complete the following information):

  • browser type and version: NA
  • superset version: 2.1.1
  • python version: NA
  • node.js version: NA
  • any feature flags active: No, a clean clone of 2.1.1 branch

Checklist

Make sure to follow these steps before submitting your issue - thank you!

  • I have checked the superset logs for python stacktraces and included it here as text if there are any.
  • I have reproduced the issue with at least the latest released version of superset.
  • I have checked the issue tracker for the same issue and I haven't found one similar.

Additional context

I'm building on my Macbook running M2

@hugosjoberg
Copy link
Contributor Author

Also, more than happy to create a PR to fix this issue once I get it sorted 😄

@sebastianliebscher
Copy link
Contributor

I can't reproduce this on amd64. I guess npm falls back to compiling packages on arm64 and therefore needs these build tools.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants