Обновить temp
This commit is contained in:
29
temp
29
temp
@@ -3,11 +3,6 @@ FROM debian:bookworm-slim AS fetcher
|
||||
|
||||
ARG MOSTLYMATTER_VERSION=v11.3.0
|
||||
ARG MATTERMOST_VERSION=11.3.0
|
||||
|
||||
# ARG MM_DOWNLOAD_URL=https://releases.mattermost.com/${MATTERMOST_VERSION}/mattermost-${MATTERMOST_VERSION}-linux-amd64.tar.gz
|
||||
# ARG MOSTLY_DOWNLOAD_URL=https://packages.framasoft.org/projects/mostlymatter/mostlymatter-amd64-${MOSTLYMATTER_VERSION}
|
||||
|
||||
|
||||
ARG MM_DOWNLOAD_URL=http://85.113.221.90:8000/mattermost-11.3.0-linux-amd64.tar.gz
|
||||
ARG MOSTLY_DOWNLOAD_URL=http://85.113.221.90:8000/mostlymatter-amd64-v11.3.0
|
||||
|
||||
@@ -17,11 +12,15 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
|
||||
WORKDIR /tmp
|
||||
|
||||
# Сначала меняем владельца в fetcher stage
|
||||
RUN curl -L $MM_DOWNLOAD_URL | tar -xz && \
|
||||
chown -R 2000:2000 /tmp/mattermost
|
||||
|
||||
RUN curl -L -o mostlymatter $MOSTLY_DOWNLOAD_URL && \ncies
|
||||
RUN apt-get update
|
||||
chmod +x mostlymatter && \
|
||||
mv mostlymatter mattermost/bin/
|
||||
# Загружаем MostlyMatter
|
||||
RUN curl -L -o /tmp/mostlymatter $MOSTLY_DOWNLOAD_URL && \
|
||||
chmod +x /tmp/mostlymatter && \
|
||||
mv /tmp/mostlymatter /tmp/mattermost/bin/ && \
|
||||
chown 2000:2000 /tmp/mattermost/bin/mostlymatter
|
||||
|
||||
# ---- Stage 2: Runtime container ----
|
||||
FROM debian:bookworm-slim
|
||||
@@ -30,18 +29,18 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
ca-certificates tzdata curl \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Создаем пользователя с тем же UID
|
||||
RUN groupadd -g 2000 mattermost && \
|
||||
useradd -u 2000 -g mattermost -s /bin/bash -d /mattermost -m mattermost
|
||||
|
||||
WORKDIR /mattermost
|
||||
|
||||
COPY --from=fetcher /tmp/mattermost /mattermost/
|
||||
# Копируем с сохранением прав
|
||||
COPY --from=fetcher --chown=2000:2000 /tmp/mattermost /mattermost/
|
||||
|
||||
RUN chown -R mattermost:mattermost /mattermost && \
|
||||
chmod 755 /mattermost/bin/mostlymatter
|
||||
|
||||
RUN mkdir -p /mattermost/config /mattermost/data /mattermost/logs /mattermost/plugins /mattermost/client/plugins && \
|
||||
chown -R mattermost:mattermost /mattermost/config /mattermost/data /mattermost/logs /mattermost/plugins /mattermost/client/plugins
|
||||
# Создаем директории (быстро, так как их мало)
|
||||
RUN mkdir -p config data logs plugins client/plugins && \
|
||||
chown -R mattermost:mattermost config data logs plugins client/plugins
|
||||
|
||||
VOLUME ["/mattermost/config", "/mattermost/data", "/mattermost/logs", "/mattermost/plugins", "/mattermost/client/plugins"]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user