From 913ea383d7fa1384eea457b3c9753fd532256434 Mon Sep 17 00:00:00 2001 From: Liyi Meng Date: Mon, 17 Aug 2026 08:20:00 +0000 Subject: [PATCH] Add dev container --- .devcontainer/Dockerfile | 100 ++++++++++++++++++++++++++++++++ .devcontainer/devcontainer.json | 29 +++++++++ 2 files changed, 129 insertions(+) create mode 100644 .devcontainer/Dockerfile create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 00000000..ff1e85bf --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,100 @@ +FROM ubuntu:24.04 AS builder + +# Pilot build against the xrdp/xorgxrdp "devel" branches (pre-0.11). +# This is NOT the same codebase as Dockerfile (v0.10.x) - devel is ~787 +# commits / ~300 files ahead of v0.10.6.1, and xorgxrdp's devel branch has +# moved together with it (137 commits / 81 files ahead of v0.10.5). Track +# them as a pair; don't mix a devel xrdp with a tagged xorgxrdp or vice versa. +# +# Known deltas from the v0.10.x build baked into this file: +# - New hard dep: libxkbfile-dev (unconditional XKB header check) +# - --enable-ibus now also needs libibus-1.0-dev + libglib2.0-dev +# - NVENC support moved into a new helper binary (xrdp-accel-assist) that +# vendors its own NVENC API headers, so the nv-codec-headers clone/symlink +# step from the stable Dockerfile is gone - it's dead weight on devel. +# - --enable-accel is auto-derived from --enable-nvenc in configure.ac, so +# no new configure flag is needed to get xrdp-accel-assist built. +# +# devel is a floating branch, not a tag: Docker layer caching means a +# `docker build` with no cache change will keep reusing an old clone. +# Always pass --no-cache (or otherwise bust the git-clone layers) to actually +# pick up new commits on each pilot run. +# +# Usage: +# docker build --no-cache -f Dockerfile.devel -t xrdp-builder:devel . +# docker run --rm -v $(pwd)/packages:/output xrdp-builder:devel + +# Get build and target platform info +ARG TARGETPLATFORM +ARG BUILDPLATFORM +ARG TARGETARCH +ARG TARGETVARIANT + +# Build arguments for versions - devel branches by default for this pilot +ARG XRDP_VERSION=devel +ARG XORGXRDP_VERSION=devel +ARG PW_MODULE_XRDP_VERSION=devel + +# Prevent interactive prompts during build +ENV DEBIAN_FRONTEND=noninteractive + +# Install build dependencies +RUN apt-get update && apt-get install -y \ + git \ + autoconf \ + automake \ + libtool \ + pkg-config \ + gcc \ + g++ \ + make \ + libssl-dev \ + libpam0g-dev \ + libx11-dev \ + libxfixes-dev \ + libxrandr-dev \ + libxkbfile-dev \ + nasm \ + xsltproc \ + flex \ + bison \ + libxml2-dev \ + dpkg-dev \ + libcap-dev \ + libfuse3-dev \ + libpixman-1-dev \ + intltool \ + xserver-xorg-dev \ + xserver-xorg-core \ + libconfig-dev \ + libjpeg-dev \ + wget \ + libturbojpeg-dev \ + libx264-dev \ + libpulse-dev \ + libopus-dev \ + libibus-1.0-dev \ + libglib2.0-dev \ + ca-certificates \ + libepoxy-dev \ + libasound2-dev \ + libdrm-dev \ + libglvnd-dev \ + libgbm-dev \ + pipewire \ + libpipewire-0.3-dev \ + libspa-0.2-dev \ + && rm -rf /var/lib/apt/lists/* + +RUN apt-get update && apt-get install -y \ + nano \ + xvfb \ + xdotool \ + ibus \ + dbus-x11 \ + openbox \ + && rm -rf /var/lib/apt/lists/* + +# Match the workspaceFolder set in devcontainer.json +WORKDIR /workspace +CMD [ "tail", "-f", "/dev/null" ] \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000..c593abe1 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,29 @@ +{ + "$schema": "https://raw.githubusercontent.com/devcontainers/spec/main/schemas/devContainer.schema.json", + "name": "XRDP", + "build": { "dockerfile": "Dockerfile" }, + "workspaceFolder": "/workspace", + "workspaceMount": "source=${localWorkspaceFolder},target=/workspace,type=bind", + "remoteUser": "root", + "mounts": [ + { + "source": "${localEnv:HOME}${localEnv:USERPROFILE}/.claude", + "target": "/root/.claude", + "type": "bind", + "consistency": "cached" + }, + { + "source": "${localEnv:HOME}${localEnv:USERPROFILE}/.gitconfig", + "target": "/root/.gitconfig", + "type": "bind", + "consistency": "cached" + }, + { + "source": "${localEnv:HOME}${localEnv:USERPROFILE}/.git-credentials", + "target": "/root/.git-credentials", + "type": "bind", + "consistency": "cached" + } + +] +} \ No newline at end of file