FROM mariadb:10.5

# Install necessary packages, including the MariaDB client
RUN apt-get update && apt-get install -y mariadb-client gettext-base

# Set the timezone
ENV TZ=Europe/Lisbon

# Copy the initialization script to the container
COPY init-db.sh /docker-entrypoint-initdb.d/

# Set permissions to allow script execution and writing in the directory
RUN chmod -R 755 /docker-entrypoint-initdb.d/
RUN chmod +x /docker-entrypoint-initdb.d/init-db.sh

# Expose port 3306
EXPOSE 3306
