Use docker for win10 to build the image, and find that the newlines in the source files COPYed to the image have been changed.

WBOY
Release: 2016-09-27 14:18:08
Original
1614 people have browsed it

The git diff command is as follows:

<code># git diff selenium60.sh
diff --git a/selenium60.sh b/selenium60.sh
index 6ce5f9f..8893fb3 100644
--- a/selenium60.sh
+++ b/selenium60.sh
@@ -1,2 +1,2 @@
-#!/bin/sh
+#!/bin/sh^M
 java -Dphantomjs.binary.path=vendor/bin/phantomjs  -Dwebdriver.firefox.profile=default -Dwebdriver.reap_profile=true -jar vendor/bin/selenium-standalone.jar -timeout 60 -browserTimeout 60
\ No newline at end of file</code>
Copy after login
Copy after login

Because I want to continue to use git to pull and update the code in the production environment, so once the newline character is changed, I cannot update the code...
Is there any way to prevent docker from modifying my newline character?

Reply content:

The git diff command is as follows:

<code># git diff selenium60.sh
diff --git a/selenium60.sh b/selenium60.sh
index 6ce5f9f..8893fb3 100644
--- a/selenium60.sh
+++ b/selenium60.sh
@@ -1,2 +1,2 @@
-#!/bin/sh
+#!/bin/sh^M
 java -Dphantomjs.binary.path=vendor/bin/phantomjs  -Dwebdriver.firefox.profile=default -Dwebdriver.reap_profile=true -jar vendor/bin/selenium-standalone.jar -timeout 60 -browserTimeout 60
\ No newline at end of file</code>
Copy after login
Copy after login

Because I want to continue to use git to pull and update the code in the production environment, so once the newline character is changed, I cannot update the code...
Is there any way to prevent docker from modifying my newline character?

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!