Files
Anthias/docker/Dockerfile.websocket
2020-11-05 13:57:12 +06:00

30 lines
733 B
Docker

FROM resin/rpi-raspbian:buster
RUN apt-get update && \
apt-get -y install --no-install-recommends \
build-essential \
curl \
libffi-dev \
python-setuptools \
python-pip \
python-dev && \
apt-get clean
RUN pip install --upgrade pip
# Install Python requirements
ADD requirements/requirements-websocket.txt /tmp/requirements.txt
RUN pip install --no-cache-dir -r /tmp/requirements.txt
# Create runtime user
RUN useradd pi
# Install config file and file structure
RUN mkdir -p /home/pi/.screenly /home/pi/screenly /home/pi/screenly_assets
RUN chown -R pi:pi /home/pi/.screenly /home/pi/screenly_assets
USER pi
WORKDIR /home/pi/screenly
CMD python websocket_server_layer.py