skip to Main Content

I am trying docker-compose in windows container,getting below error -failed to shutdown container: container . Looking at the container status for id 3878f34c9213, it says exited…how to find why this container exited or how to resolve this error ?
Windows 10 machine
Docker version 19.03.8

> docker-compose up                                           Building web
Step 1/5 : FROM python:3.7-alpine
3.7-alpine: Pulling from library/python
df20fa9351a1: Pull complete                                                                          36b3adc4ff6f: Pull complete                                                                                             d4f879c74e1d: Pull complete                                                                                             6064e23ad526: Pull complete                                                                                             ff64a3b3d6f3: Pull complete                                                                                             Digest: sha256:3bb2acc9bd988159abe35442a208895de22b76ecdbf565c636edbf01551d9905
Status: Downloaded newer image for python:3.7-alpine
 ---> 6ca3e0b1ab69
Step 2/5 : ADD . /code
 ---> 977f90bbc7d0
Step 3/5 : WORKDIR /code
 ---> Running in 300fbdd6e6aa
Removing intermediate container 300fbdd6e6aa
 ---> 5e50e300e614
Step 4/5 : RUN pip install -r requirements.txt
 ---> Running in 3878f34c9213
Collecting flask
  Downloading Flask-1.1.2-py2.py3-none-any.whl (94 kB)
Collecting redis
  Downloading redis-3.5.3-py2.py3-none-any.whl (72 kB)
Collecting Jinja2>=2.10.1
  Downloading Jinja2-2.11.2-py2.py3-none-any.whl (125 kB)
Collecting Werkzeug>=0.15
  Downloading Werkzeug-1.0.1-py2.py3-none-any.whl (298 kB)
Collecting click>=5.1
  Downloading click-7.1.2-py2.py3-none-any.whl (82 kB)
Collecting itsdangerous>=0.24
  Downloading itsdangerous-1.1.0-py2.py3-none-any.whl (16 kB)
Collecting MarkupSafe>=0.23
  Downloading MarkupSafe-1.1.1.tar.gz (19 kB)
Building wheels for collected packages: MarkupSafe
  Building wheel for MarkupSafe (setup.py): started
  Building wheel for MarkupSafe (setup.py): finished with status 'done'
  Created wheel for MarkupSafe: filename=MarkupSafe-1.1.1-py3-none-any.whl size=12629 sha256=b08bae4a80da844e9226dbae27c8fa16b6273a37a4d2cb97d34829132689bdb1
  Stored in directory: /root/.cache/pip/wheels/b9/d9/ae/63bf9056b0a22b13ade9f6b9e08187c1bb71c47ef21a8c9924
Successfully built MarkupSafe
Installing collected packages: MarkupSafe, Jinja2, Werkzeug, click, itsdangerous, flask, redis
Successfully installed Jinja2-2.11.2 MarkupSafe-1.1.1 Werkzeug-1.0.1 click-7.1.2 flask-1.1.2 itsdangerous-1.1.0 redis-3.5.3
ERROR: Service 'web' failed to build: The command '/bin/sh -c pip install -r requirements.txt' returned a non-zero code: 4294967295: failed to shutdown container: container 3878f34c9213071785a2bd0641a8490af52b5fb2607a6209c5014a33aef4ff29 encountered an error during hcsshim::System::waitBackground: failure in a Windows system call: The virtual machine or container with the specified identifier is not running. (0xc0370110): subsequent terminate failed container 3878f34c9213071785a2bd0641a8490af52b5fb2607a6209c5014a33aef4ff29 encountered an error during hcsshim::System::waitBackground: failure in a Windows system call: The virtual machine or container with the specified identifier is not running. (0xc0370110)

docker ps -a
--------------
CONTAINER ID        IMAGE               COMMAND                   CREATED             STATUS                               PORTS               NAMES
3878f34c9213        5e50e300e614        "/bin/sh -c 'pip ins…"    32 minutes ago      Exited (4294967295) 32 minutes ago                       vibrant_rosalind
636cab556759        2f1fe904a562        "/bin/sh -c 'pip ins…"    39 minutes ago      Exited (4294967295) 39 minutes ago                       silly_mclean
658dd0803e98        2f1fe904a562        "/bin/sh -c 'pip ins…"    2 hours ago         Exited (4294967295) 2 hours ago                          bold_jackson
22bd52938931        ubuntu              "/bin/bash"               13 hours ago        Exited (4294967295) 13 hours ago                         hardcore_hertz
b56a2a9a8684        ubuntu              "/bin/bash"               43 hours ago        Exited (4294967295) 13 hours ago                         vigilant_napier
f7b70aba6f84        hello-world         "cmd /C 'type C:\hel…"   44 hours ago        Exited (0) 44 hours ago                                  brave_goldberg

2

Answers


  1. When you switched to Linux containers it helped.

    If you use Linux containers than you will see "Switch to Windows containers…" when you press RMB on Docker.

    enter image description here

    Login or Signup to reply.
  2. I had this error with docker, I uninstalled docker and installed it in another version, and it worked!

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search