-
Notifications
You must be signed in to change notification settings - Fork 69
/
Copy pathDockerfile
45 lines (42 loc) · 2.3 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
FROM alpine:3.16
RUN apk update \
&& apk add --no-cache perl curl xz dmidecode pciutils usbutils \
smartmontools hdparm sysstat util-linux lm_sensors acpi iw wireless-tools glib libxrandr zlib eudev-libs libusb libdrm \
alsa-utils xrandr xdpyinfo xinput acpica iasl perl-libwww i2c-tools hwinfo libx86emu \
&& apk add --no-cache --virtual build-deps git gcc g++ make autoconf automake libtool file bsd-compat-headers libc-dev util-linux-dev flex linux-headers glib-dev libxrandr-dev zlib-dev eudev-dev libusb-dev libdrm-dev i2c-tools-dev kmod-dev \
&& git clone https://git.linuxtv.org/edid-decode.git 2>/dev/null \
&& cd edid-decode \
&& make \
&& find . -type f | perl -lne 'print if -B and -x' | xargs strip \
&& make install \
&& cd .. \
&& rm -fr edid-decode \
&& git clone https://github.com/rockowitz/ddcutil.git \
&& cd ddcutil \
&& git checkout 1.2.2-release \
&& NOCONFIGURE=1 NO_CONFIGURE=1 sh autogen.sh \
&& ./configure --prefix=/usr \
&& make \
&& find . -type f | perl -lne 'print if -B and -x' | xargs strip \
&& make install \
&& cd .. \
&& rm -fr ddcutil \
&& curl -L https://github.com/linuxhw/build-stuff/releases/download/1.6/hw-probe-1.6-AI.tar.gz > hw-probe-1.6-AI.tar.gz \
&& tar -xf hw-probe-1.6-AI.tar.gz \
&& rm -fr hw-probe-1.6-AI.tar.gz \
&& cd hw-probe-1.6-AI \
&& make install \
&& cd .. \
&& rm -fr hw-probe-1.6-AI \
&& apk del build-deps \
&& rm -fr /usr/bin/acpibin /usr/bin/acpiexamples /usr/bin/acpiexec /usr/bin/acpihelp /usr/bin/acpinames /usr/bin/acpisrc /usr/bin/lsusb.py /usr/bin/usbhid-dump \
&& rm -fr /usr/sbin/convert_hd /usr/sbin/check_hd /usr/sbin/mk_isdnhwdb /usr/sbin/getsysinfo /usr/sbin/fancontrol /usr/sbin/pwmconfig /usr/sbin/isadump /usr/sbin/isaset /usr/sbin/ownership /usr/sbin/setpci /usr/sbin/vpddecode /usr/sbin/update-smart-drivedb /usr/sbin/smartd \
&& rm -fr /usr/share/man /usr/share/doc /usr/share/pkgconfig /usr/share/cmake /usr/share/ddcutil \
&& rm -fr /usr/include \
&& rm -fr /usr/lib/pkgconfig /usr/lib/systemd /usr/lib/libddc* \
&& rm -fr /usr/share/perl5/vendor_perl/libwww/*.pod \
&& rm -fr /usr/bin/lwp-* \
&& rm -fr /var/cache/apk/*
ENV LD_LIBRARY_PATH /usr/lib64:/usr/lib
ENV DISPLAY :0
ENTRYPOINT ["/usr/bin/hw-probe", "-docker"]