-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
46 lines (35 loc) · 1.15 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
FROM python:3.10-slim
LABEL author='eskwisit'
LABEL description='Slim Docker container featuring embedded Nut server from blawar/nut latest release that works for most.'
LABEL repo='eskwisit/nut-server'
LABEL email='[email protected]'
# Prepare Nut install
RUN apt-get update && apt-get -y install \
wget \
unzip \
gcc \
libssl-dev \
libcurl4-openssl-dev \
zlib1g-dev \
libjpeg-dev
# Fetch Nut codebase
RUN wget https://github.com/blawar/nut/archive/refs/tags/v3.3.zip
RUN unzip v3.3.zip -d /root
RUN mv /root/nut-3.3 /root/nut
# Edit config
RUN mv /root/nut/conf/nut.default.conf /root/nut/conf/nut.conf
RUN sed -i '/scan/c "scan": ["\/titles"]' /root/nut/conf/nut.conf
# Remove GUI packages
RUN sed -i '/pyqt5/d' /root/nut/requirements.txt
RUN sed -i '/qt-range-slider/d' /root/nut/requirements.txt
# Add missing requirements
RUN echo markupsafe==2.0.1 >>/root/nut/requirements.txt
# Install project dependencies
RUN pip3 install -U pip
RUN pip3 install -r /root/nut/requirements.txt
VOLUME [ "/titles", "/root/nut/conf", "/root/nut/_NSPOUT" ]
EXPOSE 9000
# clean up
RUN rm v3.3.zip
RUN apt-get autoremove
CMD ["python3", "/root/nut/nut.py", "--server"]