FROM listmonk/listmonk:latest WORKDIR /listmonk # Create entrypoint script directly in the Dockerfile RUN echo '#!/bin/sh' > /entrypoint.sh && \ echo 'set -e' >> /entrypoint.sh && \ # echo 'echo "Initializing Listmonk database..."' >> /entrypoint.sh && \ # echo './listmonk --install --yes || echo "Database already initialized"' >> /entrypoint.sh && \ echo 'echo "Starting Listmonk..."' >> /entrypoint.sh && \ echo 'exec ./listmonk' >> /entrypoint.sh && \ chmod +x /entrypoint.sh EXPOSE 9000 ENV LISTMONK_app__address="0.0.0.0:9000" ENTRYPOINT ["/entrypoint.sh"]