-
Notifications
You must be signed in to change notification settings - Fork 287
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better Line Endings Support #1340
Comments
Issues go stale after 90d of inactivity. Prevent issues from auto-closing with an If this issue is safe to close now please do so. Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. |
/remove-lifecycle stale |
Yes please, this is very annoying. |
Issues go stale after 90d of inactivity. Prevent issues from auto-closing with an If this issue is safe to close now please do so. Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. |
/lifecycle frozen |
/remove-lifecycle stale |
still an issue. |
+1. Different edit tools add windows line breaks to the files, so doing things like dos2unix always is not a good option. |
I've just run into this problem today. |
same here, |
/reopen |
I am having this issue at the moment, dos2unix can help things but not always :( |
I'd like to see this issue resolved, using dos2unix introduces a lot of boilerplate for handling multiple dockerfiles. |
This is frustrating to me as well. It seems like line endings in context files are converted to CRLF even though I have repo cloned with autocrlf=input and source files contain line feeds. I have to run local docker build from under WSL to make it work. |
This is especially a problem if you're volume mounting a shell script. No amount of |
For who's stuck with it: try adding a
|
How about bash files without .sh extension? Some files like /entrypoint or create-sftp-user without .sh extensions? |
Expected behavior
Files copied to a Unix based image using
ADD
/COPY
within a Dockerfile have their line endings [optionally?] converted to acceptable Unix line endings.Actual behavior
Currently copied files will keep their Windows line endings ('\r\n'). This becomes problematic when you are trying to execute something like a bash script.
Information
Anything you want converted, you seem to have to do something similar to the following within your Dockerfile:
Docker =
17.11.0-ce-rc4-win39 (14244)
Windows =
10.0.16299
The text was updated successfully, but these errors were encountered: