1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-12-23 01:39:27 +02:00
dockerfiles/node-red/Dockerfile

35 lines
936 B
Docker
Raw Normal View History

2015-12-04 11:49:45 +02:00
#
2016-01-08 06:16:00 +02:00
# Dockerfile for node-red
2015-12-04 11:49:45 +02:00
#
2016-01-08 07:14:11 +02:00
FROM alpine
2017-04-30 15:58:14 +02:00
MAINTAINER EasyPi Software Foundation
2015-12-04 11:49:45 +02:00
2016-01-08 08:26:58 +02:00
RUN set -xe \
2017-04-30 15:58:14 +02:00
&& apk add --no-cache build-base \
2017-01-14 18:47:11 +02:00
ca-certificates \
2017-04-30 15:58:14 +02:00
curl \
2017-01-14 18:47:11 +02:00
nodejs \
2017-07-03 09:00:40 +02:00
nodejs-npm \
2017-04-30 15:58:14 +02:00
python3 \
python3-dev \
&& ln -sf /usr/bin/python3 /usr/bin/python \
&& pip3 install --no-cache-dir rpi.gpio \
2016-12-04 15:30:03 +02:00
&& npm install -g --unsafe-perm node-red \
node-red-admin \
node-red-dashboard \
2018-08-18 15:14:51 +02:00
&& sed -i '1s/bash/sh/' /usr/lib/node_modules/node-red/nodes/core/hardware/nrgpio \
&& mkdir -p /usr/share/doc/python-rpi.gpio \
2015-12-04 11:49:45 +02:00
&& apk del build-base \
2017-04-30 15:58:14 +02:00
python3-dev \
2016-07-07 21:28:46 +02:00
&& rm -rf /tmp/npm-*
2015-12-04 11:49:45 +02:00
2019-03-13 07:38:16 +02:00
WORKDIR /data
VOLUME /data
2016-07-07 21:28:46 +02:00
2015-12-04 11:56:19 +02:00
EXPOSE 1880
2019-03-16 05:09:42 +02:00
ENV FLOWS=flows.json
2019-03-13 07:38:16 +02:00
CMD ["node-red", "--userDir", "/data"]