Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CLD-8390]Fix cloud user home dir #1077

Merged
merged 1 commit into from
Sep 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,14 @@ LABEL name="Mattermost Cloud" \

ENV CLOUD=/mattermost-cloud/cloud \
USER_UID=10001 \
USER_NAME=cloud
USER_NAME=cloud \
HOME=/mattermost-cloud

RUN apk update && apk add libc6-compat \
ca-certificates \
mandoc \
aws-cli \
shadow \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this for?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

&& rm -rf /var/cache/apk/*
COPY --from=build /mattermost-cloud/build/terraform /usr/local/bin/
COPY --from=build /mattermost-cloud/build/kops /usr/local/bin/
Expand All @@ -44,11 +46,11 @@ COPY --from=build /mattermost-cloud/helm-charts /mattermost-cloud/helm-charts
COPY --from=build /mattermost-cloud/manifests /mattermost-cloud/manifests
COPY --from=build /mattermost-cloud/build/_output/${TARGETARCH}/bin/cloud /mattermost-cloud/cloud
COPY --from=build /mattermost-cloud/build/bin /usr/local/bin
RUN chown -R ${USER_UID}:${USER_UID} /mattermost-cloud/
RUN useradd ${USER_NAME} -u ${USER_UID} -d ${HOME} -s /sbin/nologin
RUN /usr/local/bin/user_setup
WORKDIR /mattermost-cloud/

USER ${USER_UID}
USER ${USER_NAME}

EXPOSE 8075
EXPOSE 8076
Expand Down
Loading