forked from mofeng-git/One-KVM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
115 lines (106 loc) · 2.6 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
FROM archlinux/archlinux:base
RUN mkdir -p /etc/pacman.d/hooks \
&& ln -s /dev/null /etc/pacman.d/hooks/30-systemd-tmpfiles.hook
RUN echo 'Server = https://mirrors.tuna.tsinghua.edu.cn/archlinux/$repo/os/$arch' > /etc/pacman.d/mirrorlist \
&& pacman-key --init \
&& pacman-key --populate archlinux
RUN pacman --noconfirm --ask=4 -Syy \
&& pacman --needed --noconfirm --ask=4 -S \
glibc \
pacman \
openssl \
openssl-1.1 \
&& pacman-db-upgrade \
&& pacman --noconfirm --ask=4 -Syu \
&& pacman --needed --noconfirm --ask=4 -S \
p11-kit \
archlinux-keyring \
ca-certificates \
ca-certificates-mozilla \
ca-certificates-utils \
&& pacman -Syu --noconfirm --ask=4 \
&& pacman -S --needed --noconfirm --ask=4 \
base-devel \
autoconf-archive \
help2man \
m4 \
vim \
git \
libjpeg \
libevent \
libutil-linux \
libbsd \
python \
python-pip \
python-build \
python-wheel \
python-setuptools \
python-tox \
python-mako \
python-yaml \
python-aiohttp \
python-aiofiles \
python-async-lru \
python-passlib \
python-pyotp \
python-qrcode \
python-pyserial \
python-setproctitle \
python-psutil \
python-netifaces \
python-systemd \
python-dbus \
python-dbus-next \
python-pygments \
python-pam \
python-pillow \
python-xlib \
python-mako \
libxkbcommon \
python-hidapi \
python-ldap \
python-zstandard \
libgpiod \
freetype2 \
nginx-mainline \
tesseract \
tesseract-data-eng \
tesseract-data-rus \
ipmitool \
socat \
eslint \
npm \
shellcheck \
&& (pacman -Sc --noconfirm || true) \
&& rm -rf /var/cache/pacman/pkg/*
COPY testenv/requirements.txt requirements.txt
RUN pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple \
&& pip install --break-system-packages -r requirements.txt \
&& pip cache purge
# https://stackoverflow.com/questions/57534295
WORKDIR /root
RUN npm config set registry https://registry.npmmirror.com \
&& npm install htmlhint -g \
&& npm install pug \
&& npm install pug-cli -g \
&& npm install @babel/eslint-parser -g \
&& npm cache clean -f
WORKDIR /
ARG USTREAMER_MIN_VERSION
ENV USTREAMER_MIN_VERSION $USTREAMER_MIN_VERSION
RUN echo $USTREAMER_MIN_VERSION
RUN git clone https://github.com/pikvm/ustreamer \
&& cd ustreamer \
&& make WITH_PYTHON=1 PREFIX=/usr DESTDIR=/ install \
&& cd - \
&& rm -rf ustreamer
RUN mkdir -p \
/etc/kvmd/{nginx,vnc} \
/var/lib/kvmd/msd \
/var/lib/kvmd/pst/data \
/opt/vc/bin
COPY testenv/fakes/vcgencmd /usr/bin/
COPY testenv/fakes/sys /fake_sysfs/sys
COPY testenv/fakes/proc /fake_procfs/proc
COPY testenv/fakes/etc /fake_etc/etc
CMD /bin/bash