diff --git a/Dockerfile.mattermost b/Dockerfile.mattermost new file mode 100644 index 00000000..6a85749b --- /dev/null +++ b/Dockerfile.mattermost @@ -0,0 +1,27 @@ +FROM rockylinux:9 AS builder + +# Install build dependencies +RUN dnf install -y git golang make gcc + +# Clone and build +WORKDIR /build +RUN git clone http://10.0.4.213:3000/claude/mattermost-community-enterprise.git . +RUN go build -v -mod=vendor -o mattermost ./cmd/mattermost + +# Runtime image +FROM rockylinux:9-minimal + +RUN microdnf install -y ca-certificates tzdata && microdnf clean all + +WORKDIR /mattermost +COPY --from=builder /build/mattermost /mattermost/bin/mattermost +COPY --from=builder /build/config /mattermost/config +COPY --from=builder /build/i18n /mattermost/i18n +COPY --from=builder /build/fonts /mattermost/fonts +COPY --from=builder /build/templates /mattermost/templates +COPY --from=builder /build/client /mattermost/client + +RUN mkdir -p /mattermost/data /mattermost/logs /mattermost/plugins /mattermost/client/plugins + +EXPOSE 8065 +ENTRYPOINT ["/mattermost/bin/mattermost"]