File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -74,13 +74,13 @@ RUN apt-get update -q && \
7474 apt-get clean
7575
7676# create new user to avoid using root; but with sudo access and no password for convenience.
77- ARG UID=1000
78- RUN if [ "$UID" != "0" ] ; then useradd --uid $UID --create-home --shell / bin/bash " user" ; fi
79- RUN usermod -append --groups sudo $(id -nu $UID || echo " user" )
77+ # NOTE: UID *MUST* align with buildozer's Dockerfile "user"
78+ RUN useradd -u 1000 -m -s /usr/ bin/bash -d /home/ user user
79+ RUN usermod -aG sudo user
8080RUN echo "%sudo ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
81- RUN HOME_DIR=$(getent passwd $UID | cut -d: -f6)
82- ENV WORK_DIR="${HOME_DIR}/wspace" \
83- PATH="${HOME_DIR}/.local/bin:${PATH}"
81+ ENV HOME_DIR=/home/user
82+ ENV WORK_DIR="${HOME_DIR}/wspace"
83+ ENV PATH="${HOME_DIR}/.local/bin:${PATH}"
8484WORKDIR ${WORK_DIR}
85- RUN chown --recursive ${UID} ${WORK_DIR}
86- USER ${UID}
85+ RUN chown -R user ${WORK_DIR}
86+ USER user
Original file line number Diff line number Diff line change @@ -17,13 +17,13 @@ RUN apt-get update -q && \
1717 apt-get clean
1818
1919# create new user to avoid using root; but with sudo access and no password for convenience.
20- ARG UID=1000
21- RUN if [ "$UID" != "0" ] ; then useradd --uid $UID --create-home --shell / bin/bash " user" ; fi
22- RUN usermod -append --groups sudo $(id -nu $UID || echo " user" )
20+ # NOTE: UID *MUST* align with buildozer's Dockerfile "user"
21+ RUN useradd -u 1000 -m -s /usr/ bin/bash -d /home/ user user
22+ RUN usermod -aG sudo user
2323RUN echo "%sudo ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
24- RUN HOME_DIR=$(getent passwd $UID | cut -d: -f6)
25- ENV WORK_DIR="${HOME_DIR}/wspace" \
26- PATH="${HOME_DIR}/.local/bin:${PATH}"
24+ ENV HOME_DIR=/home/user
25+ ENV WORK_DIR="${HOME_DIR}/wspace"
26+ ENV PATH="${HOME_DIR}/.local/bin:${PATH}"
2727WORKDIR ${WORK_DIR}
28- RUN chown --recursive ${UID} ${WORK_DIR}
29- USER ${UID}
28+ RUN chown -R user ${WORK_DIR}
29+ USER user
Original file line number Diff line number Diff line change @@ -57,16 +57,15 @@ RUN DEBIAN_CODENAME=$(lsb_release --codename --short) && \
5757 apt-get clean
5858
5959# create new user to avoid using root; but with sudo access and no password for convenience.
60- ARG UID=1000
61- RUN if [ "$UID" != "0" ] ; then useradd --uid $UID --create-home --shell / bin/bash " user" ; fi
62- RUN usermod -append --groups sudo $(id -nu $UID || echo " user" )
60+ # NOTE: UID *MUST* align with buildozer's Dockerfile "user"
61+ RUN useradd -u 1000 -m -s /usr/ bin/bash -d /home/ user user
62+ RUN usermod -aG sudo user
6363RUN echo "%sudo ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
64- RUN HOME_DIR=$(getent passwd $UID | cut -d: -f6)
65- ENV WORK_DIR="${HOME_DIR}/wspace" \
66- PATH="${HOME_DIR}/.local/bin:${PATH}"
64+ ENV HOME_DIR=/home/user
65+ ENV WORK_DIR="${HOME_DIR}/wspace"
66+ ENV PATH="${HOME_DIR}/.local/bin:${PATH}"
6767WORKDIR ${WORK_DIR}
68- RUN chown --recursive ${UID} ${WORK_DIR}
69- RUN chown ${UID} /opt
70- USER ${UID}
68+ RUN chown -R user ${WORK_DIR} /opt
69+ USER user
7170
7271RUN mkdir --parents "/opt/wine64/drive_c/electrum"
You can’t perform that action at this time.
0 commit comments