Docker Community Forums

Share and learn in the Docker community.

Proper way to do operating system agnostic container building

Hi,
I am currently working with docker compose on a windows machine with a linux Subsystem (WSL2& HyperV), as well as a linux server, and i run into the problem that after cloning my repository with all the the Dockerfiles and Scripts to create the docker compose i can not build successfully, because my files are created with windows file endings, which messes with one of my scripts.

I can fix the immediate problem by installing dos2unix and executing it on every script file that i copy, however this does not feel like a proper solution to me. Does anyone know a “good” way to remedy this problem ? ( I can not switch to Linux completely, on all machines)