docker-alerta icon indicating copy to clipboard operation
docker-alerta copied to clipboard

nginx example build fails because python is missing

Open boomcubist opened this issue 2 years ago • 1 comments

Issue Summary The webui/Dockerfile in examples/nginx fails to build because python can't be found.

npm ERR! gyp ERR! configure error 
npm ERR! gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.

Adding RUN apk add --no-cache python to webui/Dockerfile fails with python (no such package). Adding RUN apk add --no-cache python2 to webui/Dockerfile fails with python2 (no such package). Adding RUN apk add --no-cache python3 to webui/Dockerfile installs python3 and aliasing it as python with ln -sf python /usr/bin/python3 fails with npm ERR! gyp ERR! stack Error: Command failed: /usr/bin/python -c import sys; print "%s.%s.%s" % sys.version_info[:3]; npm ERR! gyp ERR! stack File "<string>", line 1 npm ERR! gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];

Environment

  • OS: Linux

  • API version: 8.7.0

  • Deployment: Docker

  • Database: Postgres

  • Server config: Auth enabled? No Auth provider? na Customer views? No (or provide the /config endpoint output)

  • web UI version: 8.7.0

  • CLI version: 8.7.0

To Reproduce Steps to reproduce the behavior: git clone https://github.com/alerta/docker-alerta.git cd docker-alerta/examples/nginx docker-compose build

Expected behavior The docker container to build successfully.

boomcubist avatar Jun 22 '22 10:06 boomcubist

I experienced the same issue.

Resolved with https://github.com/alerta/docker-alerta/pull/395

bd5872 avatar Jun 23 '22 14:06 bd5872

Fixed by #395

satterly avatar Jun 22 '23 18:06 satterly