docker: ensure application files are owned by root

We really don't want the layers user to be able to write to the
application code / settings in /opt/workdir or /opt/bin within the
layersapp container - only selected directories under /opt. It appears
that we only need to set the ownership on /opt/workdir for now.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
This commit is contained in:
Paul Eggleton 2019-05-09 17:21:35 +12:00
parent 3cd5976a7a
commit 145ddcf4ba

View File

@ -60,7 +60,7 @@ COPY docker/migrate.sh /opt/migrate.sh
RUN mkdir /opt/workdir \
&& adduser --system --uid=500 layers \
&& chown -R layers /opt
&& chown -R layers /opt/workdir
USER layers
# Always copy in .gitconfig and proxy helper script (they need editing to be active)