I usually encounter that error if I'm running a newer version of Docker than is supported by Tethys. You can figure out the Docker version with the following command:
$ docker --version
I encounter this problem on version 1.6.2, for example. But you probably need a later version of Docker to be able to the run "docker exec" command. So, there are a few options:
(1) If you have the containers already created (aka, you upgraded Docker after initializing the Tethys docker containers) then you could start them using the Docker CLI directly:
$ docker start tethys_geoserver
You can determine if the containers exist by checking if the name of the container (e.g. tethys_geoserver) is in the output of the following command:
$ docker ps -a
(2) If the Docker containers are not already created or if you want to be able to use the Tethys docker CLI, then it gets a bit messier. Browse to : /usr/lib/tethys/src/
tethys_apps/
cli/ and open docker_commands.py in a text editor. Comment out the three lines that set the restart policy:
restart_policy='always',
This is a band aid approach, but should allow you to use the newer version of Docker with Tethys. Recognize that if you do this for Dockers being used in a production server, that the restart policy will not be set, meaning if the server restarts, the docker containers will not automatically start up. The real fix would be to find out how to set the restart_policy attribute with the newer versions of Docker.