use unprivileged user

This commit is contained in:
chris 2017-03-20 13:50:48 +01:00
parent 8abef6acff
commit 60b2239372
2 changed files with 5 additions and 3 deletions

View file

@ -16,7 +16,9 @@ RUN git clone https://git.zx2c4.com/password-store && \
cd password-store && \
make install && cd .. && \
rm -rf password-store
ENV LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 HOME=/root
RUN addgroup user -g 1000 && \
adduser user -G user -u 1000 -D
ENV LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 HOME=/home/user
WORKDIR $HOME
ADD zshrc /root/.zshrc
ADD zshrc $HOME/.zshrc
CMD zsh

View file

@ -1 +1 @@
docker run --rm -ti -v ${HOME}/.gnupg:/root/.gnupg -v ${HOME}/.ssh:/root/.ssh -v ${HOME}/.password-store:/root/.password-store hnrd/toolbox
docker run --rm -ti -v ${HOME}/.gnupg:/home/user/.gnupg -v ${HOME}/.ssh:/home/user/.ssh -v ${HOME}/.password-store:/home/user/.password-store hnrd/toolbox