Joined January 2015
·

Mateusz Łapsa-Malawski

London, UK
·
·

Yes, that's exactly how it works. You can use USER as many times as you want.

hmm... unknown text processor. Let's try again :)

RUN id

USER app

ENV HOME /app

RUN id

Currently docker allows for even cleaner approch. You can just swap to specific user for next run commands. See:

RUN id
USER app
ENV HOME /app
RUN id

PS: I tend to add ENV HOME as some scripts (i.e. bower) want's to edit files in ${HOME}/.config.bla

Achievements
1 Karma
0 Total ProTip Views