Docker-compose build error

when i am building a file
it have something error
i can’t fix this error

and then this is my entrypoint.sh

#!/bin/bash

set -e

echo "directories setting"
chmod -R 755 /opt/mattermost
chown -R postgres:postgres /opt/mattermost

echo "waiting to be ready"
until pg_isready -h "$POSTGRES_HOST" -P "$POSTGRES_PORT" -U "$POSTGRES_USER"; do
     echo "not yet"
     sleep 3
done

echo "postgreSQL is running"

echo "Starting mattermost server"
/opt/mattermost/bin/mattermost "$@"

docker-compose.yml

services:
  postgres:
    image: postgres:10-alpine
    container_name: mattermost-postgres
    environment:
      - POSTGRES_USER=mattermost
      - POSTGRES_PASSWORD=mattermost123
      - POSTGRES_DB=mattermost
    networks:
      - mattermost_network
    restart: always
    volumes:
      - /var/lib/postgresql/data:/opt/postgresql/data
  mattermost:
    build:
      context: .
      dockerfile: Dockerfile
    container_name: mattermost-app
    ports:
      - "8080:8065"
    environment:
      - MM_CONFIG=/opt/mattermost/config/config.json
      - POSTGRES_HOST=postgres
      - POSTGRES_PORT=5432
      - POSTGRES_USER=mattermost
      - POSTGRES_PASSWORD=mattermost123
      - POSTGRES_DB=mattermost
    depends_on:
      - postgres
    networks:
      - mattermost_network
    volumes:
      - /opt/mattermost/config:/home/argp/mattermost-docker/config
      - /opt/mattermost/data:/home/argp/mattermost-docker/data

networks:
  mattermost_network:
    driver: bridge

Dockerfile

FROM postgres:10-alpine

RUN apk add --no-cache \
    wget \
    curl \
    gnupg \
    ca-certificates \
    postgresql-client


RUN wget https://releases.mattermost.com/10.2.0/mattermost-10.2.0-linux-amd64.tar.gz -P /tmp && \
    tar -xvzf /tmp/mattermost-10.2.0-linux-amd64.tar.gz -C /opt && \
    rm /tmp/mattermost-10.2.0-linux-amd64.tar.gz && \
    mkdir -p /opt/mattermost/data /opt/mattermost/config /opt/mattermost/logs /opt/mattermost/bin

RUN chmod -R 755 /opt/mattermost

EXPOSE 8065

WORKDIR /opt/mattermost

COPY entrypoint.sh /opt/mattermost/entrypoint.sh
RUN chmod +x /opt/mattermost/entrypoint.sh

RUN chmod +x /opt/mattermost/bin/mattermost

ENTRYPOINT ["/opt/mattermost/bin/mattermost"]

CMD ["server"]

pls find my error

my environment: ubuntu 22.04

Hi Sungwoo, thank you for sharing the details! It looks like a great start to your setup. To troubleshoot further, you might want to check if the PostgreSQL service is running properly and confirm the POSTGRES_HOST and POSTGRES_PORT values in your docker-compose.yml match your environment. Additionally, this documentation on deploying Mattermost using Docker might be helpful in verifying your configuration. Let us know how it goes! :blush:

hi thank you for your answer!
now i am trying to fix my error so i clone the docker repo from github.this docs
but i don’t have any domain
and i can’t use nginx
how can i set the file composition pls let me know!!

Hi Sungwoo, great to hear you’re making progress! If you don’t have a domain or can’t use NGINX, you can still access Mattermost locally by setting the SiteURL in your config.json to http://localhost:8065 (or the appropriate port from your docker-compose.yml). You can skip the NGINX setup for now and directly map the port to access Mattermost. Let us know if you need further assistance!