You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
** PLEASE ONLY USE THIS ISSUE TRACKER TO SUBMIT ISSUES WITH THE EXAMPLE VOTING APP **
If you have a bug working with Docker itself, not related to these labs, please file the bug on the Docker repo *
If you would like general support figuring out how to do something with Docker, please use the Docker Slack channel. If you're not on that channel, sign up for the Docker Community and you'll get an invite. *
Please provide the following information so we can assess the issue you're having
Description
Git recommends users on Windows set the core.autocrlf setting to True.
When this user clones the repo to a local repository, git converts the end-of-line characters of all files from LF \n to CRLF \r\n automatically.
This breaks the *.sh scripts used for the healthchecks by the redis and postgres containers, as they are mounted to the containers from the local filesystem, as opposed to copied into the Linux file system on the container. As a result, the vote, worker and results containers will not come up.
It may also not be clear to the user what the issue is, as inspecting the container says the healthcheck *.sh file wasn't found, but it also appears as mounted in the filesystem on the container.
Steps to reproduce the issue, if relevant:
Two options to reproduce - both working on a Windows system
git config -- global core.autocrlf true
Clone this repo to a local repository.
Then in the repository docker compose up
Alternative if you don't want to mess with your git settings:
Clone this repo to a local repository.
In VS Code, open the *.sh files in the healthchecks folder. If the info bar on the bottom indicates they are LF, click on that and change them to CRLF, then save.
docker compose up
Describe the results you received:
Only the redis and db containers will come up. If you check docker container ls, both containers will have a status of unhealthy.
If you inspect either container and check the Health data you'll see something like:
Describe the results you expected:
I expected to be able to build and bring the example up without having to mess with EOL problems. I was originally pointed to this repository but a somewhat older Docker for Beginners course, which apparently predates the addition of the healthchecks.
Additional information you deem important (e.g. issue happens only occasionally):
This can be worked around if you know what to look for, but the cause of the error is non-obvious. In VSCode, the files can be opened and manually switched from CRLF to LF in the local repository. Another option is to run dos2unix {filename} in the Git bash terminal to convert the files.
Client:
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc., v0.10.3)
compose: Docker Compose (Docker Inc., v2.15.1)
dev: Docker Dev Environments (Docker Inc., v0.1.0)
extension: Manages Docker extensions (Docker Inc., v0.2.18)
sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc., 0.6.0)
scan: Docker Scan (Docker Inc., v0.25.0)
scout: Command line tool for Docker Scout (Docker Inc., v0.6.0)
Server:
Containers: 6
Running: 2
Paused: 0
Stopped: 4
Images: 11
Server Version: 20.10.23
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
userxattr: false
Logging Driver: json-file
Cgroup Driver: cgroupfs
Cgroup Version: 1
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 2456e983eb9e37e47538f59ea18f2043c9a73640
runc version: v1.1.4-0-g5fd4c4d
init version: de40ad0
Security Options:
seccomp
Profile: default
Kernel Version: 5.10.102.1-microsoft-standard-WSL2
Operating System: Docker Desktop
OSType: linux
Architecture: x86_64
CPUs: 12
Total Memory: 12.33GiB
Name: docker-desktop
ID: XUZH:O4PL:63CS:VMLE:IDGE:QU3L:6GZZ:AELE:VGII:FFRL:DXUD:Y54I
Docker Root Dir: /var/lib/docker
Debug Mode: false
HTTP Proxy: http.docker.internal:3128
HTTPS Proxy: http.docker.internal:3128
No Proxy: hubproxy.docker.internal
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
hubproxy.docker.internal:5000
127.0.0.0/8
Live Restore Enabled: false
WARNING: No blkio throttle.read_bps_device support
WARNING: No blkio throttle.write_bps_device support
WARNING: No blkio throttle.read_iops_device support
WARNING: No blkio throttle.write_iops_device support
Additional environment details (AWS, Docker for Mac, Docker for Windows, VirtualBox, physical, etc.):
Windows 10 Home, Docker for Windows, Docker Desktop
git version 2.33.0.windows.2
The text was updated successfully, but these errors were encountered:
This issue can be avoided by following the Docker recommended strategy of cloning your repos to the WSL2 drive and avoiding NTFS filesystems altogether.
I don't see .gitattributes files in other popular repos, so I'm not sure if changing how git behaves for this repo is the correct way for us to solve this issue.
** PLEASE ONLY USE THIS ISSUE TRACKER TO SUBMIT ISSUES WITH THE EXAMPLE VOTING APP **
Please provide the following information so we can assess the issue you're having
Description
Git recommends users on Windows set the core.autocrlf setting to True.
When this user clones the repo to a local repository, git converts the end-of-line characters of all files from LF
\n
to CRLF\r\n
automatically.This breaks the *.sh scripts used for the healthchecks by the redis and postgres containers, as they are mounted to the containers from the local filesystem, as opposed to copied into the Linux file system on the container. As a result, the vote, worker and results containers will not come up.
It may also not be clear to the user what the issue is, as inspecting the container says the healthcheck *.sh file wasn't found, but it also appears as mounted in the filesystem on the container.
Steps to reproduce the issue, if relevant:
Two options to reproduce - both working on a Windows system
git config -- global core.autocrlf true
docker compose up
Alternative if you don't want to mess with your git settings:
docker compose up
Describe the results you received:
Only the redis and db containers will come up. If you check
docker container ls
, both containers will have a status of unhealthy.If you inspect either container and check the Health data you'll see something like:
Ano
Describe the results you expected:
I expected to be able to build and bring the example up without having to mess with EOL problems. I was originally pointed to this repository but a somewhat older Docker for Beginners course, which apparently predates the addition of the healthchecks.
Additional information you deem important (e.g. issue happens only occasionally):
This can be worked around if you know what to look for, but the cause of the error is non-obvious. In VSCode, the files can be opened and manually switched from CRLF to LF in the local repository. Another option is to run
dos2unix {filename}
in the Git bash terminal to convert the files.Output of
docker version
:Output of
docker info
:Additional environment details (AWS, Docker for Mac, Docker for Windows, VirtualBox, physical, etc.):
Windows 10 Home, Docker for Windows, Docker Desktop
git version 2.33.0.windows.2
The text was updated successfully, but these errors were encountered: