Installing superset on docker: /bin/sh -c /frontend-mem-nag.sh & cc /app/superset-frontend && npm ci' return a non-zero code:127

Viewed 353

When I am installing superset on docker with the command docker-compose up. It reaches state 13/37 and show following error.

Step 13/37 : RUN /frontend-mem-nag.sh && cd /app/superset-frontend && npm ci ---> Running in f7b92bd8222e : No such file or directory ERROR: Service 'superset' failed to build: The command '/bin/sh -c /frontend-mem-nag.sh && npm ci' returned a non-zero code: 127

Please advise where i can fix this. Thank you very much

1 Answers

You might have resolved this, but I struggled with the same problem today so maybe someone else needs the answer. If you are building the superset docker image on Windows and the target containers/VM are Linux based you will get the same error:

/bin/sh -c /frontend-mem-nag.sh & cc /app/superset-frontend && npm ci' return a non-zero code:127

The problem appears in the .sh script because when you do git checkout/clone it automatically changes the line ending of the file to CRLF and docker tries to execute with the same line endings.

Solution:

change the line endings to LF (use notepad++) and run the build command again.

source: thread for different project with similar problem

Related