Dockerfile17 lines · 590 chars FROM gcc:16.1
# Install build dependencies
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
build-essential git pkg-config libevdev-dev libudev-dev libconfig-dev \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /src
COPY . .
# Build from source
RUN make all
RUN make install
# Entry point: run keyd if /dev/uinput exists
ENTRYPOINT ["/bin/sh", "-c", "set -e; if [ -e /dev/uinput ]; then exec /usr/local/bin/keyd; else echo '/dev/uinput not found. Run with: docker run --rm --privileged --device /dev/uinput:/dev/uinput <image>'; exit 0; fi"]