danielguerra69 / ubuntu-xrdp

Docker fully implemented Multi User xrdp with xorgxrdp and pulseaudio on Ubuntu 16.04/18.04
MIT License
251 stars 141 forks source link

Problems creating user prior to entrypoint #20

Closed psychemedia closed 5 years ago

psychemedia commented 5 years ago

I'm trying to build a container based on this one that requires creating a user and copying some files into it's home directory.

The image builds fine, and when I run the container I can log in to it, but I am then just presented with a black screen, rather than the desktop. If

My setup pulls the ubuntu user setup as defined in the docker-entrypoint.sh file into a separate file (add-user.sh), copied and run from my Dockerfile. A modified docker-entrypoint.sh file, with the ubuntu user creation step commented out is also copied into the container. If I don't run my add-user.sh step, and just copy over the original (uncommented) docker-entrypoint.sh file, everything works fine.

It's like the user creation step has to run as part of the entrypoint?

danielguerra69 commented 5 years ago

When an user is added in the Dockerfile it's hard coded in the image. When its done in the entrypoint the user is added when the system is running. Or just add a user when its running and then log in. docker-compose exec terminalserver adduser myuser

psychemedia commented 5 years ago

A similar issue occurs when I run docker-compose exec terminalserver adduser myuser. If I try to log in with that new credential, I just see a black screen, not the desktop.

danielguerra69 commented 5 years ago

You tell me you doing something based im my image. So what is your source ?

psychemedia commented 5 years ago

IIRC, I simply commented out the user creation statements in the docker-entrypoint.sh and used them in the Dockerfile and rebuilt the container. Checking old screenshots, when I tried to run it and connect to it I either got a black screen or a sequence like this:

localhost_3390

then click the button and get:

localhost_3390A
danielguerra69 commented 5 years ago

There is a reason why it is in the entrypoint !

psychemedia commented 5 years ago

I thought as much, but I don't understand Linux and/or Docker enough to know why... I'm just trying to use it to get something done!

danielguerra69 commented 5 years ago

Yes and you can ask me all 👍 or ask google ;)

psychemedia commented 5 years ago

Right, so: what do I need to do in order to be able to create a user in the base image rather than creating it as part of the entrypoint routine.

Or if I can't why not? :-)