Docker container for xrdp (both Xorg and Xvnc) currently based on Ubuntu. Full desktop environment Xfce is supported. No privilege or sys_cap is required on the host system. These containers are lightweight and ideal for rapid development and testing purposes. Notice that the state of the container is not persisted between runs. In order to persist the state of the container, see this guide.
Originally forked from danchitnis and heavily modified.
First build the image using instructions below.
You have to give username, password, and sudo ability as input arguments to the docker run command. Hence, each user has three parameters. The process will exit if the input arguments are incorrect. Please run as interactive mode at first instance.
Example when username is foo, password is bar and sudo ability is no:
docker run -d --name xrdp -p 33890:3389 xrdp foo bar no
Once running, open Remote Desktop Connection. Enter "localhost:33890" as the address.
In this example username is foo and the password is bar.
Notice that to give sudo ability, the third input parameter for each user should be explicitly yes, otherwise any other input will be ignored.
You can add more users as a list of arguments and 3 inputs per user as described above
Example:
User | Pass | Sudo |
---|---|---|
foo | bar | yes |
baz | cox | no |
docker run -it -0d --name xrdp -p 33890:3389 xrdp foo bar yes baz qux no
To build the image, run the commands below. Additional software can be placed in the /opt directory to be installed in the Dockerfile.
docker build -f ./Dockerfile -t xrdp .
then run
docker run -it -d --name xrdp -p 33890:3389 xrdp foo bar no