Table of Contents
Reply content:
Home Backend Development PHP Tutorial Use docker for win10 to build the image, and find that the newlines in the source files COPYed to the image have been changed.

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

Sep 27, 2016 pm 02:18 PM
docker git php

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?

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

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian Dec 24, 2024 pm 04:42 PM

PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian

How to install deepseek How to install deepseek Feb 19, 2025 pm 05:48 PM

How to install deepseek

Pi Node Teaching: What is a Pi Node? How to install and set up Pi Node? Pi Node Teaching: What is a Pi Node? How to install and set up Pi Node? Mar 05, 2025 pm 05:57 PM

Pi Node Teaching: What is a Pi Node? How to install and set up Pi Node?

How To Set Up Visual Studio Code (VS Code) for PHP Development How To Set Up Visual Studio Code (VS Code) for PHP Development Dec 20, 2024 am 11:31 AM

How To Set Up Visual Studio Code (VS Code) for PHP Development

Summary of FAQs for DeepSeek usage Summary of FAQs for DeepSeek usage Feb 19, 2025 pm 03:45 PM

Summary of FAQs for DeepSeek usage

How do you parse and process HTML/XML in PHP? How do you parse and process HTML/XML in PHP? Feb 07, 2025 am 11:57 AM

How do you parse and process HTML/XML in PHP?

What are the AI ​​tools? What are the AI ​​tools? Nov 29, 2024 am 11:11 AM

What are the AI ​​tools?

PHP Program to Count Vowels in a String PHP Program to Count Vowels in a String Feb 07, 2025 pm 12:12 PM

PHP Program to Count Vowels in a String

See all articles