Dockerfile41 lines · 1279 chars FROM ubuntu:jammy-20260210.1 AS builder
# Build dependencies
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates curl ca-certificates \
build-essential autoconf automake libtool pkg-config git m4 nasm yasm \
libpam0g-dev libssl-dev libx11-dev libxext-dev libxfixes-dev libxrandr-dev \
libjpeg-dev libpng-dev zlib1g-dev libxkbfile-dev \
gawk bison flex libglib2.0-dev libgtk2.0-dev libgnutls28-dev \
libpulse-dev libpulse0 \
libsystemd-dev pkg-config
# Clone the repository including submodules to ensure ulalaca etc exist
WORKDIR /src
RUN git clone --recursive https://github.com/neutrinolabs/xrdp.git .
# Ensure submodules are initialized in case bootstrap path doesn't trigger
RUN git submodule update --init --recursive || true
ARG CONF_FLAGS
ENV CONF_FLAGS="${CONF_FLAGS}"
# Build XRDP from source
RUN ./bootstrap && ./configure $CONF_FLAGS && make -j"$(nproc)" install
# Runtime image
FROM ubuntu:jammy-20260210.1 AS runtime
WORKDIR /root
# Copy built artifacts from builder
COPY --from=builder /usr/local /usr/local
# Ensure dynamic linker cache is updated in the runtime too
RUN ldconfig || true
EXPOSE 3389
CMD ["/usr/local/sbin/xrdp"]