scottyhardy / docker-remote-desktop

Docker image for Remote Desktop server with audio support
MIT License
242 stars 123 forks source link

Move user creation to Dockerfile #36

Open hexial opened 10 months ago

hexial commented 10 months ago

Hi

I wanted to install some application and setup some things when building my docker image that used docker-remote-desktop. But these commands I want to run as the ubuntu user. Since that user is created in entrypoint.sh the ubuntu user is not available during docker build phase.

My proposal to this is to have the user created in Dockerfile and then my Dockerfile could look something like this, if my docker image needs to download an app from some where and unpack it in my home folder. Or do other things as the ubuntu user during build phase.

FROM scottyhardy/docker-remote-desktop
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update &&  \
    apt-get install -y \
    wget
USER ubuntu
RUN cd /home/ubuntu && \
    wget https://url-to-something/app.tar.gz && \
    tar -zxf app.tar.gz
USER root