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