Skip to content

Commit

Permalink
fix(dockerfile): Make DataHub the owner of the /tmp/datahub folder (#98)
Browse files Browse the repository at this point in the history
Co-authored-by: Harshal Sheth <[email protected]>
  • Loading branch information
pedro93 and hsheth2 authored Sep 21, 2023
1 parent 63d17fd commit 73c267d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docker/datahub-actions/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ RUN mkdir -p /etc/datahub/actions/conf && mkdir -p /etc/datahub/actions/system/c
COPY ./docker/config/*.yaml /etc/datahub/actions/system/conf

RUN addgroup --system datahub && adduser --system datahub --ingroup datahub \
&& chown datahub /etc/datahub \
&& chown -R datahub /tmp/datahub
&& chown datahub:datahub /etc/datahub \
&& chown -R datahub:datahub /tmp/datahub

# By transferring the root user's pip cache directory to the datahub
# user, we can avoid the need for some redundant dependency downloads.
RUN mkdir -p /home/datahub/.cache \
&& mv /root/.cache/pip /home/datahub/.cache/pip \
&& chown -R datahub /home/datahub/.cache/pip
&& chown -R datahub:datahub /home/datahub/.cache/pip

FROM ${APP_ENV}-install as final
USER datahub
Expand Down

0 comments on commit 73c267d

Please sign in to comment.