Compare commits

...

2 Commits

Author SHA1 Message Date
Mathieu Maret
2a6c558040 Relogin to set some env var
e.g. $USER is not set without that
2015-06-11 10:42:17 +02:00
Mathieu Maret
3aae115d61 Add user to sudo group 2015-06-11 10:42:08 +02:00

View File

@ -30,7 +30,7 @@ ADD https://commondatastorage.googleapis.com/git-repo-downloads/repo /usr/local/
RUN chmod 755 /usr/local/bin/* RUN chmod 755 /usr/local/bin/*
# All builds will be done by user aosp # All builds will be done by user aosp
RUN useradd --create-home aosp RUN useradd --create-home aosp && echo "aosp:aosp" | chpasswd && adduser aosp sudo
ADD gitconfig /home/aosp/.gitconfig ADD gitconfig /home/aosp/.gitconfig
ADD ssh_config /home/aosp/.ssh/config ADD ssh_config /home/aosp/.ssh/config
RUN chown aosp:aosp /home/aosp/.gitconfig RUN chown aosp:aosp /home/aosp/.gitconfig
@ -46,3 +46,6 @@ ENV CCACHE_DIR /tmp/ccache
# Work in the build directory, repo is expected to be init'd here # Work in the build directory, repo is expected to be init'd here
USER aosp USER aosp
WORKDIR /aosp WORKDIR /aosp
#Relogin to set env var such as USER
CMD sudo -i -u aosp