Skip to content

Commit

Permalink
Revert "Agent owns its directories (#3084)"
Browse files Browse the repository at this point in the history
This reverts commit c79ee5f.
  • Loading branch information
michalpristas authored Jul 27, 2023
1 parent 39f3d77 commit 84e2cfa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 35 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ FROM {{ .buildFrom }} AS home
COPY beat {{ $beatHome }}

RUN mkdir -p {{ $beatHome }}/data {{ $beatHome }}/data/elastic-agent-{{ commit_short }}/logs && \
chown -R root:root {{ $beatHome }} && \
find {{ $beatHome }} -type d -exec chmod 0755 {} \; && \
find {{ $beatHome }} -type f -exec chmod 0644 {} \; && \
find {{ $beatHome }}/data -type d -exec chmod 0770 {} \; && \
Expand Down Expand Up @@ -143,10 +144,8 @@ true
RUN mkdir /app
{{- end }}
{{- else }}
RUN groupadd --gid 1000 {{ .BeatName }} && \
useradd -M --uid 1000 --gid 1000 --groups 0 --home {{ $beatHome }} {{ .user }} && \
chown -R {{ .user }}:{{ .user }} {{ $beatHome }} && \
true
RUN groupadd --gid 1000 {{ .BeatName }}
RUN useradd -M --uid 1000 --gid 1000 --groups 0 --home {{ $beatHome }} {{ .user }}

{{- if contains .image_name "-cloud" }}
# Generate folder for a stub command that will be overwritten at runtime
Expand Down

0 comments on commit 84e2cfa

Please sign in to comment.