Conversation
There was a problem hiding this comment.
Pull request overview
This PR aims to make xrdp start more reliably in a Windows 10 + WSL2 Docker environment by delaying startup and keeping the service in the foreground under Supervisor, and it also updates the Alpine base image tag.
Changes:
- Delay
xrdpstartup and run it with--nodaemonunder supervisord. - Switch Docker base image from
alpine:edgetoalpine:latest.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| supervisord.conf | Adds a delayed xrdp start and runs it in foreground mode for Supervisor. |
| Dockerfile | Updates the base image tag to alpine:latest. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| [program:xrdp] | ||
| command=/usr/sbin/xrdp | ||
| command=bash -c 'sleep 5 && /usr/sbin/xrdp --nodaemon' |
There was a problem hiding this comment.
Using bash -c 'sleep 5 && /usr/sbin/xrdp --nodaemon' leaves a long-running bash process as PID supervised by supervisord. On shutdown/restart, signals may not be forwarded cleanly to xrdp, which can leave orphaned processes. Prefer replacing the shell with the daemon after the delay (e.g., via exec) or moving the delay logic into a small wrapper script that execs xrdp as PID 1 for this program.
| command=bash -c 'sleep 5 && /usr/sbin/xrdp --nodaemon' | |
| command=bash -c 'sleep 5; exec /usr/sbin/xrdp --nodaemon' |
| FROM alpine:latest | ||
|
|
||
| RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories |
There was a problem hiding this comment.
Switching to alpine:latest makes builds non-reproducible over time and, combined with appending the edge/testing repository below, can lead to dependency/version skew (packages and transitive deps coming from different Alpine releases). Consider pinning the Alpine base to a specific version and using repositories that match that version (or explicitly pin the needed packages) to avoid unexpected breakage.
| FROM alpine:latest | |
| RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories | |
| FROM alpine:3.19 |
I was testing this with my Windows 10 & WSL 2 docker environment and xrdp started and failed.
Some sleep and --nodaemon flag to it