Docker 'redirection unexpected' error

I ran into the exact same error today,

The solution was to remove ‘uname -s’ - ‘uname -m’ out of the curl installation step and replace it with the specific version.

So this:

curl -L https://github.com/docker/compose/releases/download/1.24.1/docker-compose-`uname -s-uname -m` -o /usr/local/bin/docker-compose

Becomes this:

curl -L https://github.com/docker/compose/releases/download/1.24.1/docker-compose-Linux-x86_64 -o /usr/local/bin/docker-compose

As soon as I did that everything worked as expected.