Skip to content

Commit

Permalink
Update dev-tools/packaging/templates/docker/Dockerfile.elastic-agent.…
Browse files Browse the repository at this point in the history
…tmpl

Co-authored-by: Paolo Chilà <[email protected]>
  • Loading branch information
michalpristas and pchila authored Oct 10, 2023
1 parent b9d3981 commit f4bf8e6
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ RUN setcap cap_net_raw,cap_setuid+p {{ $beatHome }}/data/elastic-agent-{{ commit
# For security reasons setcap does not support symlinks. This is smart in the general case
# but in our specific case since we're building a trusted image from trusted binaries this is
# fine. Thus, we use readlink to follow the link and setcap on the actual binary
readlink -f {{ $beatBinary }} | xargs setcap {{ .linux_capabilities }} && \
setcap {{ .linux_capabilities }} $(readlink -f {{ $beatBinary }}) && \
{{- end }}
true

Expand Down

0 comments on commit f4bf8e6

Please sign in to comment.