this is just a colletion of some erors i have encounted with docker and ubuntu linux in a windows virtual machine;

 

Error response from daemon: You cannot remove a restarting container

I tried many commands to stop and delete a dead running container, I tried many commands and only one worked

  1. docker rm $(docker ps -a -q)
  2. docker ps
  3. docker-compose down
  4. docker ps
  5. docker rm $(docker ps -a -q)
  6. umount /var/lib/docker/devicemapper/mnt/235e921652c2f3253f87c14f6d523789f9cc2d660c7c791f7aa9ad9516cbcb65
  7. docker rm $(docker ps --all -q -f status=dead)
  8. docker ps -a
  9. docker-compose down
  10. grep docker /proc/*/mountinfo
  11. sudo service nginx stop
  12. docker ps
  13. docker rm -f app
  14. docker ps

 The winner is docker rm -f <APP_NAME>

 docker configure: error: Please reinstall the libzip distribution

FIX: To solve this problem all I had to do is add  libzip-dev to the apt-get dependencies in the Dockerfile, Example:

# Install dependencies
RUN apt-get update && apt-get install -y \
    build-essential \
    libpng-dev \
    libjpeg62-turbo-dev \
    libfreetype6-dev \
    locales \
    zip \
    jpegoptim optipng pngquant gifsicle \
    vim \
    unzip \
    git \
    curl \
    libzip-dev

Hope that helps