Spaces:
Paused
Paused
Download Dockerfile from 2Btainment/node-red: direct link, hf CLI and curl.
- Browser
- Download file 1.97 kB
-
https://huggingface.co/spaces/2Btainment/node-red/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/2Btainment/node-red/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/2Btainment/node-red/resolve/main/Dockerfile
1.97 kB
| # Einswarm Node-RED — Hugging Face Docker Space (cpu-basic) | |
| # nginx :7860 → Node-RED :1880; strips X-Frame-Options / CORP for HF embed | |
| FROM nodered/node-red:latest | |
| USER root | |
| RUN set -eux; \ | |
| if command -v apk >/dev/null 2>&1; then \ | |
| apk add --no-cache nginx tini curl bash openssl; \ | |
| else \ | |
| apt-get update && apt-get install -y --no-install-recommends nginx tini curl bash openssl ca-certificates \ | |
| && rm -rf /var/lib/apt/lists/*; \ | |
| fi; \ | |
| mkdir -p \ | |
| /data \ | |
| /einswarm \ | |
| /tmp/nginx_client_body \ | |
| /tmp/nginx_proxy \ | |
| /tmp/nginx_fastcgi \ | |
| /tmp/nginx_uwsgi \ | |
| /tmp/nginx_scgi \ | |
| /var/log/nginx \ | |
| /var/lib/nginx/tmp \ | |
| /run/nginx; \ | |
| chown -R node-red:root /data /einswarm /tmp/nginx_client_body /tmp/nginx_proxy /tmp/nginx_fastcgi /tmp/nginx_uwsgi /tmp/nginx_scgi /var/log/nginx /var/lib/nginx /run/nginx; \ | |
| chmod -R g+rwX /data /einswarm /tmp/nginx_client_body /tmp/nginx_proxy /tmp/nginx_fastcgi /tmp/nginx_uwsgi /tmp/nginx_scgi /var/log/nginx /var/lib/nginx /run/nginx; \ | |
| ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime || true; \ | |
| echo "Europe/Berlin" > /etc/timezone || true; \ | |
| # Ensure tini path exists as /sbin/tini for ENTRYPOINT | |
| if [ ! -x /sbin/tini ] && [ -x /usr/bin/tini ]; then ln -sf /usr/bin/tini /sbin/tini; fi | |
| COPY nginx.conf /etc/nginx/nginx.conf | |
| COPY settings.js /einswarm/settings.js | |
| COPY einswarm-editor.css /einswarm/einswarm-editor.css | |
| COPY bmc-loader.js /einswarm/bmc-loader.js | |
| COPY assets/einswarm-logo.png /einswarm/einswarm-logo.png | |
| COPY entrypoint.sh /entrypoint.sh | |
| RUN chmod 755 /entrypoint.sh \ | |
| && chmod 644 /etc/nginx/nginx.conf /einswarm/settings.js /einswarm/einswarm-editor.css /einswarm/bmc-loader.js \ | |
| && chown -R node-red:root /einswarm /entrypoint.sh | |
| ENV TZ=Europe/Berlin \ | |
| FLOWS=flows.json \ | |
| NODE_RED_ENABLE_SAFE_MODE=false | |
| WORKDIR /usr/src/node-red | |
| USER node-red | |
| EXPOSE 7860 | |
| ENTRYPOINT ["/sbin/tini", "--", "/entrypoint.sh"] | |