Skip to content

Conversation

kmos
Copy link
Member

@kmos kmos commented Oct 1, 2025

closes https://issues.redhat.com/browse/DBZ-9516

Mongodb Custom image

  • DockerFile with custom entrypoint
  • entrypoint with replicaset enabled
  • support for external hostname
  • CI build script

@kmos kmos requested review from AlvarVG and jpechane October 1, 2025 06:48
# Copy custom entrypoint script
COPY mongodb-debezium-entrypoint.sh /usr/local/bin/mongodb-debezium-entrypoint.sh

RUN chmod +x /usr/local/bin/mongodb-debezium-entrypoint.sh
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just being picky. You can save this sentence using --chmod in the previous one.

Copy link
Contributor

@jpechane jpechane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!
I just left two minor comments,

tries=30
while true; do
if ! { [ -s "$PIDFILE" ] && ps "$(cat "$PIDFILE")" > /dev/null 2>&1; }; then
echo "❌ mongod process did not stay running. Check logs for errors."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we sure that emoji work on all terminals, CI etc.?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, probably not

mongod --fork --dbpath "$DB_PATH" --port "$PORT" --logpath "$LOG_PATH" --pidfilepath "$PIDFILE"

echo "=> Waiting for MongoDB to start..."
tries=30
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be configurabe, I can imagine that CI might need longer time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants