ERROR: for orthanc Cannot start service orthanc: driver failed

When I run the command "sudo docker-compose down" from the terminal I am getting following

Stopping runningorthancwithdocker_orthanc-index_1 ... done
Removing runningorthancwithdocker_orthanc_1 ... done
Removing runningorthancwithdocker_orthanc-index_1 ... done
Removing network runningorthancwithdocker_default

But when I run the command "sudo docker-compose up --build -d" from terminal then I am getting the following error:

Creating network "runningorthancwithdocker_default" with the default driver
Building orthanc
Step 1/2 : FROM osimis/orthanc-webviewer-plugin
---> 3b7ad253edd5
Step 2/2 : COPY orthanc.json /etc/orthanc/
---> Using cache
---> 167f73a4bcdb
Successfully built 167f73a4bcdb
Successfully tagged runningorthancwithdocker_orthanc:latest
Creating runningorthancwithdocker_orthanc-index_1
Creating runningorthancwithdocker_orthanc_1

ERROR: for orthanc Cannot start service orthanc: driver failed programming external connectivity on endpoint runningorthancwithdocker_orthanc_1 (e481264646fb995731ab390e25a668d60b7b9772be5755bef3b06758c11d56b6): Bind for 0.0.0.0:80 failed: port is already allocated
ERROR: Encountered errors while bringing up the project.

How to fix this error

Is there something already running in port 80?

Chico Venancio

At port 80 Orthanc is running I tried to stop with command "sudo docker-compose down" but it is not stopping.

It is possible yet another process is already listening on that port.

*nix:
# ss --tcp --listen --numeric --processes | grep :80

Windows:
https://groups.google.com/d/msg/orthanc-users/Knmt2KZfsj0/7BgCoBYrBAAJ

If you can confirm it is indeed not stopping, verify the docker-compose
project name (maybe you renamed the parent directory and use the
implicit project name?).

$ docker-compose ps
$ docker container ls

Either set the project name appropriately or take down the old
container manually.

$ docker container stop ${old_project_name}_orthanc_1

From your log output, it really sounds like an unrelated process
though.