ipp-usb-docker/Dockerfile

27 lines
1.8 KiB
Docker

FROM golang:bookworm AS builder
RUN apt update && apt install -y git libusb-dev libusb-1.0-0-dev libavahi-client-dev libavahi-common-dev build-essential gcc libusb-0.1-4 libavahi-client3 libavahi-common3 libusb-1.0-0
RUN git clone https://github.com/OpenPrinting/ipp-usb.git
RUN cd ipp-usb && make && pwd && ldd ipp-usb
FROM scratch
COPY --from=builder /go/ipp-usb/ipp-usb /app/ipp-usb
COPY --from=builder /lib/x86_64-linux-gnu/libavahi-common.so.3 /lib/x86_64-linux-gnu/libavahi-common.so.3
COPY --from=builder /lib/x86_64-linux-gnu/libavahi-client.so.3 /lib/x86_64-linux-gnu/libavahi-client.so.3
COPY --from=builder /lib/x86_64-linux-gnu/libusb-1.0.so.0 /lib/x86_64-linux-gnu/libusb-1.0.so.0
COPY --from=builder /lib/x86_64-linux-gnu/libc.so.6 /lib/x86_64-linux-gnu/libc.so.6
COPY --from=builder /lib/x86_64-linux-gnu/libdbus-1.so.3 /lib/x86_64-linux-gnu/libdbus-1.so.3
COPY --from=builder /lib/x86_64-linux-gnu/libudev.so.1 /lib/x86_64-linux-gnu/libudev.so.1
COPY --from=builder /lib/x86_64-linux-gnu/libpthread.so.0 /lib/x86_64-linux-gnu/libpthread.so.0
COPY --from=builder /lib64/ld-linux-x86-64.so.2 /lib64/ld-linux-x86-64.so.2
COPY --from=builder /lib/x86_64-linux-gnu/libsystemd.so.0 /lib/x86_64-linux-gnu/libsystemd.so.0
COPY --from=builder /lib/x86_64-linux-gnu/libcap.so.2 /lib/x86_64-linux-gnu/libcap.so.2
COPY --from=builder /lib/x86_64-linux-gnu/libgcrypt.so.20 /lib/x86_64-linux-gnu/libgcrypt.so.20
COPY --from=builder /lib/x86_64-linux-gnu/liblzma.so.5 /lib/x86_64-linux-gnu/liblzma.so.5
COPY --from=builder /lib/x86_64-linux-gnu/libzstd.so.1 /lib/x86_64-linux-gnu/libzstd.so.1
COPY --from=builder /lib/x86_64-linux-gnu/liblz4.so.1 /lib/x86_64-linux-gnu/liblz4.so.1
COPY --from=builder /lib/x86_64-linux-gnu/libgpg-error.so.0 /lib/x86_64-linux-gnu/libgpg-error.so.0
ENTRYPOINT ["/app/ipp-usb"]