Reduces the number of layers.

This commit is contained in:
Werner Beroux 2016-03-11 11:25:04 +01:00
parent d4cdb35e29
commit 0f98a32963
1 changed files with 6 additions and 5 deletions

View File

@ -13,11 +13,12 @@ COPY ngrok.yml /home/ngrok/.ngrok2/
COPY entrypoint.sh / COPY entrypoint.sh /
# Create non-root user. # Create non-root user.
RUN echo 'ngrok:x:6737:6737:Ngrok user:/home/ngrok:/bin/false' >> /etc/passwd RUN set -x \
RUN echo 'ngrok:x:6737:' >> /etc/group && echo 'ngrok:x:6737:6737:Ngrok user:/home/ngrok:/bin/false' >> /etc/passwd \
RUN chown ngrok:ngrok /home/ngrok && echo 'ngrok:x:6737:' >> /etc/group \
RUN chmod -R go=u,go-w /home/ngrok && chown ngrok:ngrok /home/ngrok \
RUN chmod go= /home/ngrok && chmod -R go=u,go-w /home/ngrok \
&& chmod go= /home/ngrok
USER ngrok USER ngrok