Skip to content

Commit

Permalink
Don't rely on current directory for files chmods
Browse files Browse the repository at this point in the history
  • Loading branch information
jsoriano committed Nov 5, 2018
1 parent 530bc94 commit c72feaf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dev-tools/packaging/templates/docker/Dockerfile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ RUN setcap {{ .linux_capabilities }} {{ $beatBinary }}
RUN groupadd --gid 1000 {{ .BeatName }}

WORKDIR {{ $beatHome }}
RUN mkdir data logs && \
chown -R root:{{ .BeatName }} . && \
RUN mkdir {{ $beatHome }}/data {{ $beatHome }}/logs && \
chown -R root:{{ .BeatName }} {{ $beatHome }} && \
find {{ $beatHome }} -type d -exec chmod 0750 {} \; && \
find {{ $beatHome }} -type f -exec chmod 0640 {} \; && \
chmod 0750 {{ $beatBinary }} && \
chmod 0770 data logs
chmod 0770 {{ $beatHome }}/data {{ $beatHome }}/logs
{{- range $i, $modulesd := .ModulesDirs }}
RUN chmod 0770 {{ $modulesd }}
{{- end }}
Expand Down

0 comments on commit c72feaf

Please sign in to comment.