Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move user creation to Dockerfile #36

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hexial
Copy link

@hexial hexial commented Dec 17, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant