Skip to content

Conversation

egandro
Copy link

@egandro egandro commented Jan 21, 2025

The netcat command is missing in wait-for-it.sh.

When using the official docker container start.sh script has a race condition:

scripts/wait-for-it.sh ${DATABASE_HOST} -- echo "database is up" is not blocking the execution of the start process - the migrate command fails.

I think it was not discovered during your regular development process, as the database is always created during build time RUN yarn db-deploy.

My patch hopefully fixes the root cause of the official docker images.

Copy link

@codablock codablock left a comment

Choose a reason for hiding this comment

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

See inline comments, but it'S just a NIT.

I'd also suggest to introduce "set -e" to the top of start.sh to avoid such issues in the future. I assume that the error nc command is missing! was present in all logs but forever ignored because it did not cause the start script to exit.


RUN apt-get update \
&& apt-get install -y netcat-openbsd \
&& apt-get clean \

Choose a reason for hiding this comment

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

The clean should not be required anymore, as all major debian based images have apt hooks that perform a clean automatically. Only the "rm -rf" is required nowadays.

@krumware
Copy link
Collaborator

This should no longer be an issue. Please reopen if it is!

@krumware krumware closed this Oct 17, 2025
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