Skip to content

Commit 889a82d

Browse files
committed
Fix directory permissions
Signed-off-by: Kaur Palang <[email protected]>
1 parent da28677 commit 889a82d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

templates/Dockerfile.tpl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ COPY --chmod=755 entrypoint.sh /opt/engine/entrypoint.sh
4444
RUN rm -rf cli-lib manager-lib \
4545
&& rm mirth-cli-launcher.jar oiecommand
4646

47-
RUN chown -R {{ $.config.uid }}:{{ $.config.gid }} /opt/engine
48-
4947
{{- /* Assign current version slug into a variable to carry it into the tags iteration */}}
5048
{{- $slug := dict "slug" .version.slug -}}
5149
{{/* Iterate version tags to generate the final stages */}}
@@ -65,10 +63,12 @@ RUN apt-get update \
6563
&& rm -rf /var/lib/apt/lists/* \
6664
&& groupmod --new-name engine ubuntu \
6765
&& usermod -l engine ubuntu \
68-
&& usermod -aG engine engine
66+
&& usermod -aG engine engine \
67+
&& chown -R {{ $.config.uid }}:{{ $.config.gid }} /opt/engine
6968
{{- else if eq .distro "alpine" }}
7069
RUN apk add --no-cache bash unzip \
71-
&& adduser -D -H -u {{ $.config.uid }} engine engine
70+
&& adduser -D -H -u {{ $.config.uid }} engine engine \
71+
&& chown -R {{ $.config.uid }}:{{ $.config.gid }} /opt/engine
7272
{{- end }}
7373

7474
VOLUME /opt/engine/appdata

0 commit comments

Comments
 (0)