fix permission in plugin folder (#331)

This commit is contained in:
Carlos Tadeu Panato Junior 2018-10-19 16:08:09 +02:00 committed by Kyâne Pichou
parent 94c09b61a0
commit 647ca3e8c6

View File

@ -25,7 +25,7 @@ RUN apk add --no-cache \
&& rm -rf /tmp/* && rm -rf /tmp/*
# Get Mattermost # Get Mattermost
RUN mkdir -p /mattermost/data \ RUN mkdir -p /mattermost/data /mattermost/plugins /mattermost/client/plugins \
&& if [ ! -z "$MM_BINARY" ]; then curl $MM_BINARY | tar -xvz ; \ && if [ ! -z "$MM_BINARY" ]; then curl $MM_BINARY | tar -xvz ; \
elif [ "$edition" = "team" ] ; then curl https://releases.mattermost.com/$MM_VERSION/mattermost-team-$MM_VERSION-linux-amd64.tar.gz | tar -xvz ; \ elif [ "$edition" = "team" ] ; then curl https://releases.mattermost.com/$MM_VERSION/mattermost-team-$MM_VERSION-linux-amd64.tar.gz | tar -xvz ; \
else curl https://releases.mattermost.com/$MM_VERSION/mattermost-$MM_VERSION-linux-amd64.tar.gz | tar -xvz ; fi \ else curl https://releases.mattermost.com/$MM_VERSION/mattermost-$MM_VERSION-linux-amd64.tar.gz | tar -xvz ; fi \
@ -33,7 +33,7 @@ RUN mkdir -p /mattermost/data \
&& rm -rf /mattermost/config/config.json \ && rm -rf /mattermost/config/config.json \
&& addgroup -g ${PGID} mattermost \ && addgroup -g ${PGID} mattermost \
&& adduser -D -u ${PUID} -G mattermost -h /mattermost -D mattermost \ && adduser -D -u ${PUID} -G mattermost -h /mattermost -D mattermost \
&& chown -R mattermost:mattermost /mattermost /config.json.save && chown -R mattermost:mattermost /mattermost /config.json.save /mattermost/plugins /mattermost/client/plugins
USER mattermost USER mattermost