/ QUICK TIPS

Docker run problem no such file or directory (or other strange message)

When you cannot start Docker container correctly and have problems like No such file or directory or some other unintuitive message, there is one thing you should check first…

Correct line endings (EOL) in files copied to Docker

Check if you pass to Docker image scripts (or other text files) with Unix line endings (LF)! Notepad++ screenshot with Unix EOL conversion option shown

With wrong EOL you will be lucky if message somehow indicates it, for example:
line 3: $’\r’: command not found

but it often looks in a way which gives no clue, what is wrong.

I once spent more than 2 hours because of it, so I hope that with this blog post you will not have to :)

If you have problem which looks similar but is not caused by wrong EOL, please share it in comment, I will try to help you figure it out, then update this post for others.

Tometchy speaker

If you want we can arrange remote consultations. Reach me at tometchy@gmail.com

tometchy

Tometchy

Passionate focused on agile software development and decentralized systems

Read More