Skip to content

Commit

Permalink
docs: simplify permissions for Dockerfile COPY (elastic#27754)
Browse files Browse the repository at this point in the history
  • Loading branch information
mshavliuk authored and wiwen committed Nov 1, 2021
1 parent 01281e2 commit fdd2147
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions libbeat/docs/shared-docker.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -294,10 +294,7 @@ ifeval::["{beatname_lc}"!="auditbeat"]
["source", "dockerfile", subs="attributes"]
--------------------------------------------
FROM {dockerimage}
COPY {beatname_lc}.yml /usr/share/{beatname_lc}/{beatname_lc}.yml
USER root
RUN chown root:{beatname_lc} /usr/share/{beatname_lc}/{beatname_lc}.yml
USER {beatname_lc}
COPY --chown=root:{beatname_lc} {beatname_lc}.yml /usr/share/{beatname_lc}/{beatname_lc}.yml
--------------------------------------------

endif::[]
Expand Down

0 comments on commit fdd2147

Please sign in to comment.