Linux containers sometimes fail to start on Windows when using Docker 4.12+
See original GitHub issueDescribe the bug
While trying to use the dependencies for a task batect isn’t waiting for the dependencies to pass health checks.
Reproduction repo
given the following batect.yml
containers:
postgres:
image: postgres:12.8-alpine
redis:
image: redis:6-alpine
tasks:
run:test:
description: Run task with dependencies
group: Run tasks
dependencies:
- redis
run:
container: postgres
Steps to reproduce
run the following command ./batect --log-file batect_logfile run:test
output
Running run:test...
redis: starting container...
postgres: waiting for dependency redis to be ready...
Error: Could not run container redis.
The pipe is being closed.
Clean up: done
The task run:test failed. See above for details.
Expected behaviour
tasks wait for redis to start
Actual behaviour
batect fails to wait for less than the docker defaults for healthchecks and fails within a second.
Version information
batect version:
Batect version: 0.81.0
Built: 2022-09-05 06:19:30 +0000
Built from commit: 488e0911965172593db201f4be65a374d0e45e4c (commit date: 2022-09-05 15:44:52 +1000)
JVM version: Oracle Corporation Java HotSpot(TM) 64-Bit Server VM 1.8.0_341
OS version: Windows 10 10.0 amd64
Docker version: 20.10.17 (API version: 1.41, minimum supported API version: 1.12, commit: a89b842, operating system: 'linux', architecture: 'amd64', experimental: true)
Git version: 2.33.1.windows.1
OS: Windows 10 Enterprise version 21H2
Java version:
java version "1.8.0_341"
Java(TM) SE Runtime Environment (build 1.8.0_341-b10)
Java HotSpot(TM) 64-Bit Server VM (build 25.341-b10, mixed mode)
Docker version: (running WSL-2)
Client:
Cloud integration: v1.0.29
Version: 20.10.17
API version: 1.41
Go version: go1.17.11
Git commit: 100c701
Built: Mon Jun 6 23:09:02 2022
OS/Arch: windows/amd64
Context: default
Experimental: false
Server: Docker Desktop 4.12.0 (85629)
Engine:
Version: 20.10.17
API version: 1.41 (minimum version 1.12)
Go version: go1.17.11
Git commit: a89b842
Built: Mon Jun 6 23:01:23 2022
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.6.8
GitCommit: 9cd3357b7fd7218e4aec3eae239db1f68a5a6ec6
runc:
Version: 1.1.4
GitCommit: v1.1.4-0-g5fd4c4d
docker-init:
Version: 0.19.0
GitCommit: de40ad0
Any other information
unable to attach batect logs due to length, can share by alternative method if required
Issue Analytics
- State:
- Created a year ago
- Comments:28
Top Results From Across the Web
4.12.0 (85629)] Docker Desktop failed to start on Windows · ...
I have tried with the latest version of Docker Desktop I have tried ... 4.12.0 (85629)] Docker Desktop failed to start on Windows...
Read more >[SOLVED] Docker Failed to Start - Docker Desktop for ...
Issue Type: Docker Failed to Start OS Version/Build: Windows 10 - 10.0.18363 ... On install, Docker fails to start (with Linux Containers).
Read more >Docker Failed to Start
On Windows 11 with Docker Desktop v4.13.1 everything works fine with both Linux and Windows containers. Than after a couple of restarts I ......
Read more >Docker Engine failed to start - Fix
Docker Desktop will not start after Install or an upgrade with an ... Fixed a bug when switching from Linux to Windows containers...
Read more >How To Install Docker Desktop And Troubleshoot Issues In ...
Docker Desktop for Windows throwing Error · Step 1 – Run Docker Services · Step 2- Enable Hyper-V and Containers · Step 3-...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Also, just as an aside, thank you for the very cool tool. This particular issue notwithstanding, Batect has never skipped a beat.
No worries @MichaelKnightXero, thanks for getting back to me. Let’s leave this open until we solve it once and for all.