This repository has been archived by the owner on Dec 29, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
58 lines (42 loc) · 1.41 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
47
48
49
50
51
52
53
54
55
56
57
58
FROM ubuntu:18.04
RUN apt-get update && \
apt-get install -y --no-install-recommends \
git \
wget \
gzip \
tar \
build-essential \
imagemagick \
libv4l-dev \
cmake \
sudo \
ca-certificates \
unzip \
socat
# This is to allow the klipper install script to run without error
RUN ln -s /bin/true /bin/systemctl
# enable klipper to install by creating users
COPY klippy.sudoers /etc/sudoers.d/klippy
RUN useradd -ms /bin/bash klippy && \
useradd -ms /bin/bash dwc2-klipper && \
adduser dwc2-klipper dialout
USER dwc2-klipper
WORKDIR /home/dwc2-klipper
RUN git clone https://github.com/KevinOConnor/klipper && \
./klipper/scripts/install-ubuntu-18.04.sh
RUN virtualenv ./klippy-env && \
./klippy-env/bin/pip install tornado==5.1.1
RUN git clone https://github.com/pluuuk/dwc2-for-klipper.git && \
ln -s ~/dwc2-for-klipper/web_dwc2.py ~/klipper/klippy/extras/web_dwc2.py
RUN mkdir -p /home/dwc2-klipper/sdcard/dwc2/web && \
mkdir -p /home/dwc2-klipper/sdcard/sys
WORKDIR /home/dwc2-klipper/sdcard/dwc2/web
RUN wget https://github.com/chrishamm/DuetWebControl/releases/download/2.1.7/DuetWebControl-SD.zip && \
unzip *.zip && for f_ in $(find . | grep '.gz');do gunzip ${f_};done
WORKDIR /home/dwc2-klipper
EXPOSE 4750
USER root
# Clean up hack for install script
RUN rm -f /bin/systemctl
COPY runklipper.py /
CMD ["/usr/bin/python","/runklipper.py"]