|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FROM postgres:12 |
|
|
|
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 467B942D3A79BD29 |
|
RUN apt-get update && apt-get install -y ca-certificates |
|
|
|
|
|
|
|
ARG UID=1000 |
|
ARG GID=1000 |
|
|
|
|
|
RUN groupadd -g ${GID} mmgroup && \ |
|
useradd -u ${UID} -g ${GID} -m -s /bin/bash mmuser |
|
|
|
|
|
RUN chown -R ${UID}:${GID} /var/lib/postgresql/data |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ENV POSTGRES_USER=mmuser |
|
ENV POSTGRES_PASSWORD=mostest |
|
ENV POSTGRES_DB=mattermost_test |
|
|
|
|
|
|
|
|
|
WORKDIR /mm |
|
|
|
|
|
ADD https://releases.mattermost.com/9.7.1/mattermost-team-9.7.1-linux-amd64.tar.gz . |
|
RUN tar -zxvf mattermost-team-*-linux-amd64.tar.gz |
|
ADD config_docker.json ./mattermost/config/config_docker.json |
|
ADD docker-entry.sh . |
|
|
|
RUN chmod +x ./docker-entry.sh |
|
|
|
|
|
ENTRYPOINT ./docker-entry.sh |
|
|
|
|
|
ENV PATH="/mm/mattermost/bin:${PATH}" |
|
|
|
|
|
RUN mkdir ./mattermost-data |
|
VOLUME /mm/mattermost-data |
|
|
|
|
|
USER mmuser |
|
|
|
|
|
EXPOSE 8065 |